Yeah!!
I think in a unary % message too... but the syntax become ambiguous.
For example:
| positive |
positive := 8.
1 % positive.
It's not clear if % is in binary form and must use positive as a collaborator... or if is a unary message and must then send positive.. :(
(By the way I like the % as a unary message more than a binary :P )
It's great with dates too:
January first, 2010
works ok in Chalten...
Regards,
Gabriel
Reminds me again how close Smalltalk comes to the real world.
Dont know if the interest rate of 0.1 is still valid after
the financial crisis ;) but I always liked this natural
expression style of Smalltalk:
�initialCapital := 100 dollars.
�interestRate := 0.1 / 1 year.
Especially the ease of "1 year", "1 month" or "Date today".
If you ever worked with the date and calendar mess in Java
you know what I'm talking about. I can even write:
� 100 m2
� 100 USD
� 100 EUR
� 100 �
Unfortunately I cant (yet) write unary messages like this in Smalltalk:
�100 $
�100 %
Wonder why not. Parser gives "Message pattern expected", maybe
because of unary vs. binary.
Have to think about it ...
--
GRATIS f�r alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project