>> On Mon, 1 Nov 2010, Igor Stasenko wrote: >> Hello, >> >> Out of curiosity, i tried to look how it would be hard to change >> parser to support extended continuation syntax. >> ...
> This idea comes up every few years. This post sums up well the last > attempt: http://blog.3plus4.org/2007/08/30/message-chains/ . > I don't think it's worth changing the syntax for this. IMHO 1-2 pairs of > parentheses usually improve readability. More parenthesis is rarely > needed. Also mixing ;; with ; makes the code harder to understand. Try > this: self foo ; bar ;; baz ; foo ;; bar ; baz. > Note that the term 'continuation' means a totally different thing: > http://en.wikipedia.org/wiki/Continuation . > Levente I was one of the apparently many who proposed an operator like this in the past. (I never discussed implementation and using continuations never occurred to me). My idea didn't seem popular then so I assume it won't fly now though, for the record, I would like to see such an operator. I prefer adding this syntax than the use of "asPipe" method (see http://blog.3plus4.org/2007/08/30/message-chains/) though I admit that asPipe is a very clever idea. I too dislike use of ";;" syntax; for me it conjures up the ugly "=" vs "==" syntax of C and subsequent languages that failed to fix this problem. ----------------------------------------------------------------------------------------------- One thing mentioned in the "asPipe" discussion is that each class can create it's own syntax/compiler. This strikes me as a really useful feature of Smalltalk. What I don't understand is: How do you do this? This feature is important enough that it should out in the open with proper documentation, some useful examples, etc. How about putting this information in Pharo by Example? If such a feature was available, and apparently it is, I would like to use it to be able write regular expressions or grammars as methods of a class and then have them be compiled from the editor (in the same way I do for smalltalk methods). Hopefully, I haven't upset too many by having two unrelated topics in a single post. Regards, Ralph Boland