Symbol and Array printOn:

Dan Ingalls Dan.Ingalls at disney.com
Thu Jan 13 17:18:22 UTC 2000


Lex wrote:
>> So for symbols, the # notation is easy.  For arrays, it is far 
>> more involved. It would be greatly simplified, though, if constant 
>> arrays were to produce instants of a LiteralArray class instead 
>> of the generic Array.  

Andreas replied:
>Unfortunately that's tricky since you won't be able to do something like
>
>	1 perform: #+ withArguments: #( 2 )
>
>The VM checks at several places if an argument is an instance of Array and
>fails if it isn't (#perform:withArguments: is just one example though I
>think the most important). Been there, tried that :-(

It shouldn't be all that hard to change those tests to just make sure it is indexable-pointers and of the right size.  Though I have never known this as the source of a bug, it would improve robustness.

	- Dan






More information about the Squeak-dev mailing list