Re: [R] Random number generation

From: Esmail Bonakdarian <>
Date: Tue, 13 May 2008 10:12:31 -0400

Greg Snow wrote:
>> -----Original Message-----
>> From:
>> [] On Behalf Of Esmail Bonakdarian
>> Sent: Sunday, May 11, 2008 7:25 AM
>> To: Prof Brian Ripley
>> Cc:
>> Subject: Re: [R] Random number generation

> [snip]

>> What I read doesn't seem to be incorrect however (it may even
>> have been an archived message here), the *language* itself
>> does not seem to support block *comments*. Using conditional
>> constructs, or an IDE/editor to achieve similar results is a
>> work around - but not the same. I don't mean to nitpick, but
>> as a computer scientist I see this as different :-)
> I am not a computer scientist, so correct me if I am wrong, but from what I remember (and a quick glance at my copy of Kernighan Ritchie), the C *language* itself does not support block *comments*, rather the preproccessor

Hi there,

Yes, while that may be true, many other languages that don't use an explicit pre-processor mechanism (though internally will go through a similar process) do support block comments. It's a moot point anyway, since when you compile a C program the preprocessor also runs (just like the linker etc) unless you specifically ask for something differently via command line switches. As far as the programmer is concerned the semantics are those of a language that provides block comments with the simple use of /* */ , and not dependent on if-statements or editor/IDE tricks.

> Since R is optimized for interactive use rather than compilation, running everything through a preproccessor is not really an option. However as an additional work around

My use then may be not typical since I am trying to write scripts in R and only use R directly to try out functions/language constructs.

> you could always run your R scripts through the C preproccessor and  > have it strip the block comments for you.

Too much work, call me old school, but I like the computer do work for me, rather than the other way around :-)

> Given the complexity of implementing block commenting (even deciding on the syntax) and the ease of current work arounds, the cost benefit ratio probably puts this very near the bottom of the priority list.

I couldn't possibly offer an opinion on that .. I'll happily defer to you and the other experts here for this.

Esmail mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 13 May 2008 - 14:52:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 13 May 2008 - 19:30:37 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive