[GOODIE] Arithmetic assignments (+= and friends)
Richard A. O'Keefe
ok at cs.otago.ac.nz
Tue Jun 18 02:46:13 UTC 2002
>>a += b 12
>>a *= b 35
Hans-Martin wrote:
I implemented the SmallScript Syntax (a :+= b) a while ago, and think that I
posted it to the list.
Oh, just what we need, ANOTHER syntax.
Algol 68 introduced the update assignment operators,
and it spelled them <binary operator>:=
+:= is clear. :+= is just a mess.
+:= tells us what to do with _: accept +_ as well.
:+= leaves us baffled about which side of _ the + should go.
+= is C envy; it does not include either of Squeak's assignment operators.
It also leaves us wondering whether +<arrow> is allowed, and if not, why
not.
Simple rule: <variable> <binary selector> <assign> <rhs>
means <variable> <assign> <variable> <binary selector> (<rhs>).
More information about the Squeak-dev
mailing list
|