Re: [R] R annoyances

From: Jan T. Kim <>
Date: Fri 20 May 2005 - 20:00:46 EST

On Thu, May 19, 2005 at 03:10:53PM -0400, John Fox wrote:

> Since you can use variables named c, q, or t in any event, I don't see why
> the existence of functions with these names is much of an impediment.

True, particularly since I'm not too likely to use these variables for (local) functions, and variables of other types don't prevent functions from working. (I thought this was a problem... I must be spoilt by recently having to read too much Matlab code, where parentheses are used to both enclose subscripts and parameter lists, thus rendering subscript expressions and function calls syntactically indistinguishable.)

> The problem that I see with T and F is that allowing them to be redefined
> sets a trap for people. If R wants to discourage use of T and F for TRUE and
> FALSE, then why provide standard global variables by these names? On the
> other hand, if providing T and F is considered desirable (e.g., for S-PLUS
> compatibility), then why not make them reserved names?

Perhaps, it's a legacy code thing -- if there's both code relying on T and F being aliases of TRUE and FALSE, and code using T or F as variable names, then the situation cannot be resolved in either way without breaking some code.

Best regards, Jan

 +- Jan T. Kim -------------------------------------------------------+
 |    *NEW*    email:                               |
 |    *NEW*    WWW:             |
 *-----=<  hierarchical systems are for files, not for humans  >=-----*

______________________________________________ mailing list
PLEASE do read the posting guide!
Received on Fri May 20 19:11:21 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:56 EST