From: "Wesley J. Landaker" Date: 2003-06-17T23:58:34+09:00 Subject: Re: Multiline comments? > Hi, > > At Tue, 17 Jun 2003 00:33:35 +0900, > Wesley J. Landaker wrote: >> > The first reason is the notation. At least, (* *) and /* */ >> > conflicted or didn't match with Ruby's syntax. Do you have any >> idea? >> >> Not to say that /* ... */ matches Ruby's syntax very well, but it >> doesn't really conflict, does it? You can't start a regex with /* >> because the kleene star is not referencing anything. > Yes, it certainly doesn't conflict, but might cause confusion. > '/' is used as also an operator not only regexp. > > What do you expect from this? > > p //* 2 That's not much worse than what you'd get if you did that in C or C++, but that's not saying much. ;) Anyway, I don't think /* ... */ fits well into Ruby's syntax, but what about something like: %#{}? We have %w{}, %r{}, etc... seems like %#{} is pretty intuitive. But then, it does conflict with #{} expansion in strings, so I guess you'd have to say no comments inside of strings (which seems reasonable--you can't currently put regular "#" comments in strings). Well, just throwing out ideas. To be honest, =begin and =end or just adding #'s to the beginning of each line works pretty well for me. The only thing I do miss a little is a way to do inline comments: code (comment) more code Wes