Let's start with portability.
I have ST/X, VAST, VW, Squeak, Pharo, GST,
Dolphin, and some minor systems.
GST and ST/X do not define #at: on any kind of
integer at all.�� Why would they?�� #basicAt:
will do the job, will it not?
Dolphin defines #at:[put:] on Integer as
self shouldNotImplement
and so does VW.
In VAST,
20 at: 1 => primitive failed
20 factorial at: 1 => 2192834560
In Squeak and Pharo,
20 at: 1 => not indexable
20 factorial at: 1 => 0
So sending #at: to an integer is not portable
between mainstream Smalltalk systems, and for
those Smalltalks that define it on large
integers, the value is not consistent on the
same machine and operating system.
But it is worse than that.�� Maybe you do not
care about any Smalltalk but Pharo, and there
is a case to be made for that.�� But this
is not consistent with *itself*.
1000000000000 at: 1
fails in a 64-bit VM,
where that is a SmallInteger, but
answers 0 in a 32-bit VM,
where that is a LargePositiveInteger.
But it gets *worse*.�� Numbers are not
supposed to be mutable.�� But in a 32-bit
VM,
�� x := 1000000000000.
�� x at: 1 put: 77.
�� x
=> 1000000000077.
I'm sorry, but I had enough grief with
constants that weren't in Fortran 66.
Again, there isn't the slightest need to
define #at:put: on Large...Integers because
#basicAt:put: exists. Indeed, we have
#{basicAt:,at:,digitAt:}[put:] and surely
with #digitAt:[put:] around we can let
#at:[put:] be unimplemented on integers?
T
here's a conceptual problem with #at: and