2011/11/1 Sean P. DeNigris <[email protected]>: > > Schwab,Wilhelm K wrote: >> >> ...It would be nice if it were portable to other Smalltalks, but it would >> be useful. >> ... >> XP advocates would tell us that we don't need the code and to just delete >> it. >> > > The second point is valid, but only applies to a subset of comments. For > example, in my case the thing that needs to be commented is Applescript code > that provides context for the method. It is part of the documentation, and > must contain double quotes to be valid Applescript. > > -- > View this message in context: > http://forum.world.st/Comment-Syntax-tp3961451p3962192.html > Sent from the Pharo Smalltalk mailing list archive at Nabble.com. > >
An alternative would be like in some scripting language : everything after this mark is a comment. We can even doIt easily with Smalltalk-80 parser, I remember that the end of tokens was marked with a DoIt character encoded as value 30 or something like that ;) If you did introduce such character in code, then interpretation did stop at the DoIt mark. I always thought this was a bug - but now I understand a possible usage :) Of course, this only works when Browsing a single method. If you file out sources, then you still have to delimit the method source with doubled bangs ! or something... So take this as a joke more than a proposition. Nicolas
