Dot notation and a crazy idea

Stefan Matthias Aust sma at mail.netsurf.de
Tue Mar 23 19:59:43 UTC 1999


>Not a bad idea... any syntax change in Smalltalk needs to "carry its
>weight", so it might as well be as general as possible.  

I agree. Well said.

>I've also always thought that the @ sign was underutilized in Smalltalk...
>changing at: to a binary @ would be great also for the higher precedence
>of a binary operator.  Although replacing at:put: is more of a
>challenge... I wouldn't go so far as adding new syntax (such as the
>suggested a[1] := b[3] etc.).

While I consider the differences between "a[x]" and "a at: i" quite minor,
I always wanted to make the assignment in "at:put:" more explicit,
something like "(a at: i) := x" for example. "a[1] := x" helps here, but
unfortunately introduces more syntax for only this special case.  Is there
any way to generalize this?  For example, "at::=" could be a valid keyword
message as could "a:=" (to use "self a := 1" instead of "self a: 1").  

Anymore strange ideas anyone?
--
Stefan Matthias Aust  //  ...and now something completely different





More information about the Squeak-dev mailing list