#++

Tim Rowledge rowledge at interval.com
Sun Jun 13 03:13:21 UTC 1999


On Sat 12 Jun, Andres Valloud wrote:
> Hi.
> 
> I've just seen that it takes 4 bytecodes to increment a small integer
> by 1, namely:
[SNIP]
> Wouldn't it be better to have another kind of bytecode, say
The real problem with this is that SmallIntergers are manifest constants
and cannot be side-effected this way. '++' and it's brethren are C-isms
that rely on the way that C variables are merely labels for memory
locations. A SmallInteger is absolutely _not_ just a memory location that
can be pillaged by the local toughguys.
Although one could implement a ++ bytecode that would function, I cannot
imagine any way it would be proper, moral, decent or otherwise acceptable.
As Adele says "Ask, don't touch" - and ++ is akin to groping someones
underwear!

tim

-- 
Useful random insult:- Can't program his way out of a for-loop.
Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
 tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>





More information about the Squeak-dev mailing list