[GOODIE] Arithmetic assignments (+= and friends)
Andreas Raab
Andreas.Raab at gmx.de
Mon Jun 17 12:48:53 UTC 2002
Hans-Martin,
> I implemented the SmallScript Syntax (a :+= b) a while ago,
I know it might sound defensive but do you *really* like the :+=
syntax?! To me this looks more like a regexp than an assignment ;-)
> and think that I posted it to the list.
Unfortunately I don't remember having seen it. Could you repost the
changes?!
> Please consider using that syntax, because it visually
> implies assignment,
What could += possibly mean other than assignment?!
> and does not interfere with the ability
> to write binary selectors *= etc (not that I would want to, but
> until now you could).
Well, the only uses I've seen sofar were inplace operations (and I wrote
'em ;-) Note that the ability to write binary selectors of this form
could be obtained by seeing if the left hand side is a variable (then,
the only requirement for the implementation would be that it returns
self) but it appears to me that it's a somewhat useless exercise...
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|