Re: [R] R annoyances

From: Duncan Murdoch <>
Date: Sat 21 May 2005 - 08:05:49 EST

Taylor, Z Todd wrote:
> On Friday, May 20, 2005 11:29 AM, Jari Oksanen wrote:

>>The most beautiful thing in old R (I started with 0.63) was 
>>that it was 
>>in the elegant unix tradition: all lower case and point (full stop, 
>>period, whatever) in places where you needed it. It is 
>>unfortunate that 
>>other languages are creeping in and old neat constructions 
>>are replaces 
>>with C++ style uGliNess. There was a grace period when switching from 
>>beautiful (fair) print.coefmat to ugLy printCoefmat, but some changes 
>>were more abrupt (package.description). I have a feeling that the 
>>recent trashing of names.dist (with a lot of code breakage 
>>even in base 
>>R) was caused by the same kind of political correctness.
>>Please Mr R, keep it like it used to be...

> BecauseIt'sFridayI'llJoinIntoThisTiredOldDebate.TheUseOfMixedCase
> UglinessToDistinguishBetween"Words"InObjectNamesIsIndeedAn
> Abomination.
> It_is_much_easier,_and_demonstrably_so_I_would_say,_to_use
> some_kind_of_real_separator_between_"words."
> S.and.R.have.historically.encouraged.a.different.separator
> than.most.other.languages,

Using an underscore will break old versions of R, and some versions of S-PLUS. Using a dot will break S3 method dispatch.

Using mixed case will lead to complaints from people who don't mind breaking one of those things.

What's a package author to do??

I suggest that we redefine "+" to be a legal character in the name of an identifier. Sure, if you used to have "a+b" you'll have to rewrite it as "+(a,b)", but think of the benefits! You+can+write+out+long+sentences+and+use+them+as+variable+names!

Duncan Murdoch
> And the double benefit is that it leaves case available for
> other good uses, such as indicating an object's scope:
> local.var
> Class.Data
> --Todd mailing list PLEASE do read the posting guide! Received on Sat May 21 08:10:37 2005

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