[GOODIE] Arithmetic assignments (+= and friends)
Diego Gomez Deck
DiegoGomezDeck at ConsultAr.com
Mon Jun 17 15:08:18 UTC 2002
Hi Andreas,
>Diego,
>
>> To say the true, I don't like any option.
>
>Well, that's okay - I didn't say you have to like it (neither did I say
>you have to file it in or even to use it ;-)
I'm only trying to avoid the inclusion in the 'official' updates.
>> If you want, try to remove the assigment (the only not a
>> message thing) and not to expand it.
>
>No, I don't want to. If it's your interest to remove assignment *you* go
>for it ;-)
Not for now, We'll see in the future.
>I have no interest in any kind of minimal syntax. And the
>complexity of explaining that += means "increase this variable's value
>by X" doesn't seem a big hurdle to me.
This is not true in Smalltalk.
I read:
a += 2.
as: Send the message #+= to the object named a and then name a to the answer.
and I feel more natural to write:
a := a + 1.
because is more direct the translation.
someName := SomeObject.
is translated as: 'name someName to the object to the right side'
>Cheers,
> - Andreas
Cheers,
Diego
PS: Will We see at SqueakNic the June/22?
More information about the Squeak-dev
mailing list
|