Lukas Renggli wrote:

> Supporting underscore identifiers and assignments at the same time
> seems to be tricky, as there are all kinds of new ambiguities:
> a_1negated could be an assignment of 1 negated to a, or an access of
> the variable a_1negated :-/

GemStone has supported both for the past couple of years. The rule we 
use is that _ must have whitespace on both sides to be considered 
assignment, otherwise it's part of a selector or variable name.

This allowed us to continue using _ in selectors and variables, which 
we'd allowed from the very beginning, and made it easier to port Squeak 
code to GemStone.

I'm not sure we've run across *any* code in actual use that uses 
underscore assignment without surrounding it with whitespace; certainly 
most code does put whitespace around assignments.


Regards,

-Martin

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to