I feel very strongly that . as a statement separator *must* be followed with at least one whitespace character and that the ramar should reflect this. But I know some people disagree strongly. If I were designing a successor language to smalltalk I would add this to the syntax. The argument fort me is one of readability and flexibility. I don't see 1 foo.2 bar.3 baz as readable. 1 foo. 2 bar. 3 baz is much more readable. Further, being able to use . in literal symbols is nice. The Borning/Ingalls multiple inheritance system used this feature so that one could say e.g. self SomeSuperclass.selector to indicate one wanted to use the implementation inherited from SomeSuperclass, instead of using the potentially ambiguous super.
So by requiring the statement separator to be a period and one or more whitespace characters the ambiguity disappears, and .2 could be legal Smalltalk syntax.
On Sun, Aug 31, 2008 at 2:33 PM, Alejandro F. Reimondo < aleReimondo@smalltalking.net> wrote:
Hi!
{ 0.2.3.4.5.6 } printString '#(0.2 3.4 5.6)'
Under my eyes, the problem is related with the non-smalltalk syntax of braces... The problem is a side effect of queueing sentences in a pseudo-array notation (remove the braces and the ambiguity vanishes).
IMO, all said to non-st numeric notation is correct, and the same work (of remotion) must be done on {....} syntax. The same is applicable to ifNil:... and friends because it promote the idea (in newbies) that it is better to write faster...
cheers, Ale.
----- Original Message ----- From: "nicolas cellier" <ncellier@ifrance.com
To: squeak-dev@lists.squeakfoundation.org Sent: Sunday, August 31, 2008 4:12 PM Subject: [squeak-dev] Re: Number readFrom: can we remove some "accidental"features
Igor Stasenko a écrit :
2008/8/31 Stéphane Rollandin lecteur@zogotounga.net:
Igor Stasenko a écrit :
My guess it can stay, but only as separate helper method, which reads a numbers and expecting non-smalltalk syntax.
yes, useful for end-user input in numerical applications. we could spare them the .2 = 2 experience...
Btw, everyone is content with such ambigility?
{ 0.2.3.4.5.6 } printString '#(0.2 3.4 5.6)'
Yes funny. Guess in which language you can evaluate
-3r=3r-.-3r-=3r
No, it is not /etc/printcap. That's why Stef (Ducasse) asked for cleanup I guess.