[R] variable scope

Sam Steingold sds at gnu.org
Tue Aug 28 23:55:23 CEST 2012


> * R. Michael Weylandt <zvpunry.jrlynaqg at tznvy.pbz> [2012-08-28 13:45:35 -0500]:
>
>> always you shouldn't need manual garbage collection.

my observation is that gc in R sucks.
(it cannot release small objects).
this is not specific to R; ocaml suffers too.

> since a loop doesn't define its own scope like some languages (a
> practice that always seemed strange to me),

every level of indentation has its own scope.
seems reasonable.

> The other answer is to use functions / apply statements like the good
> lord and John Chambers intended :-)

so explicit loops are "deprecated" in some sense?

thanks for your kind and informative reply!
-- 
Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000
http://www.childpsy.net/ http://ffii.org http://mideasttruth.com
http://think-israel.org http://pmw.org.il http://honestreporting.com
Computers are like air conditioners: they don't work with open windows!




More information about the R-help mailing list