From: "W. Kent Starr" Date: 2001-07-05T14:06:49+09:00 Subject: [ruby-talk:17274] Re: /* */ comments On Wednesday 04 July 2001 09:12, Stephen White wrote: > On Wed, 4 Jul 2001, James (ruby-talk) wrote: > > Err, well, aethetics aside, having a simple way to block-comment > > code is very handy. Trying to comment out large sections by > > prepending '#' to every line is tedious. > > You pretty much have to go through every line anyway to make sure there's > no other comments in the middle of the code: > > Eg: > > code > code > code > code /* comment */ > code > code > code > > If you were to comment block this out, you'd end up with > > /* > code > code > code > code /* comment */ > code > code > code > */ > > Which would be an error. For this reason, I prefer "#" since it always > works and can handle other "#"s already in the code. FWIW in c++ I use: #if 0 // this code sux :-) - wks(20010704) code code code code /* comment */ code code code #endif for avoiding precisely the same "gotcha" Stephen brings up. In addition, it's a nice to quickly distinguish blocked out code from true comments blocks, also a handy "feature." > > Anyway, I don't have any real concerns either way... I was just responding > to Dave's request for opinions. :) Ditto. In Ruby I just use begin=, end= to block out (at the time) questionable code. Downside is with rd2 that stuff shows up. Of course, that may be an upside too, depending :-) Regards, Kent Starr elderburn@mindspring.com