[squeak-dev] smalltalk evolution

Frank Shearar frank.shearar at gmail.com
Tue May 31 14:33:52 UTC 2011


2011/5/31 info at tomsik.cz <info at tomsik.cz>:
> Sorry, I forgot about uselessness of array literals.
>
> I simply don't see any use-case in which I'd like to
> evaluate something in compile-time, it's feels to me
> like another form of static state.
>
> Are there any (major) advantages of array literals?
> Something which couldn't be done without them?

Yes: express array literals concisely, without having to mentally
strip out multiple occurences of "with:".

I use array literals all the time in my tests (of the {} variety), and
it makes (in my opinion at least) for much more readable tests.

Compare #(1 1 2 3 5 8 13) with Array with: 1 with: 1 with: 2 with: 3
with: oh no, Array doesn't actually have a message that takes 7
parameters.

More importantly though, we're quibbling about something that's not
very important at all when we could be figuring out how to address the
real problems that Squeak faces, such as modularity.

frank



More information about the Squeak-dev mailing list