On Dec 18, 2008, at 6:34 PM, Lukas Renggli wrote:
I've discussed with Stephane and may be we can fix all the methods that have : _ instead of := or some methods have [ : myArg ... ] instead of [ :myArg .... ]
I agree that the use of := should be enforced. I would also like to be able to use _ in names.
However: The parser should allow spaces after the $: in block arguments. This is essentially the same syntax as for keyword method declarations without a keyword and there you also allow arbitrary spaces after the colon (normally you even put them there). So I understand when people write block arguments the same way as they do for keyword method declarations:
to: stop by: step ...
[ : stop : step | ... ]
It looks a weak argument to me :) I would hate to teach that. I neither thought you could even do that.
So we can use a parser that strictly check that we respect grammar. There is in this mail an attach file that contains the list of the classes and methods that are not corrects.
All Smalltalk allow spaces after the $: in blocks. Disallowing this makes porting unnecessary hard.
I was not aware of that. So this would be a reason to allow that but in pharo core code I would really like not to have that. To me this is a weakness of the parser and not a feature.
Lukas
-- Lukas Renggli http://www.lukas-renggli.ch
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project