From: Zsban Ambrus Date: 2005-01-14T18:24:54+09:00 Subject: Re: why dosn't ruby support // to comment? On Tue, Jan 11, 2005 at 04:11:31PM +0900, Alexey Verkhovsky wrote: > Because // is an empty regular expression. Not only that, but also a division by a regular expression. That might sound silly, but in the pike programming language, you can split strings with the / operator. Thus, someone might want to do this in ruby: class String; alias_method :/, :split; end; w1, w2 = "foo:bar"//:/; puts w2; And to carry it even further, one can consider these examples too: A division of a character constant: puts ?//5; Or a division of a symbol: class Symbol; def /(x); x.send(self, 2); end; end; puts ://5; But of course these last two cases could still be exceptions from the comment syntax, just like # now is not a comment in single quotes either. (But note that the // comment could be normal syntax in C too before it was accepted by C99, for example this expression 9//*foo*/2 has different meaning in traditional C and C99.) ambrus