Why we should remove {} from Squeak
ducasse stephane
ducasse at iam.unibe.ch
Sun Sep 30 06:49:31 UTC 2001
Hi daniel
I send it into the mailing list too becuase this is important
>From a language design perspective
#() is necessary because it is compiled statically and cannot not be
simulated by other construct. Storing #() in Stack frame is not really goo
but this is an implementation aspect.
#{} is not necessary because this is shortcut macro-expansion for Array new
add: ....
So why having only this one. There is two ways:
or you have a way to describe macro-expansion like in Scheme where you
can define any macro in a clear way (you know the semantic of the stuff
or we remove it because why not having
{{}} for Set new add:
{#[]} for OrderedCollection new....Because I use more
OrderedCollection than array
Removing would simply the parser, compiler, Object simpler the printer
printer the VM, the bytes code emitter, then Squeak would be a bit more
standard but this is not the most important point. Why can I send the
message caseOf: to ___any Object___ berk!!!!
I'm pretty sure that I can destroy the semantics prevservation of certain
refactoring (I did it for ObjectStudio RB because OS has this &(*&*&(
construct too). The parser of Rb in Squeak has to e more complex than the
one of VW because of the expressions inside {}....
And it would avoid to have people writing,
(I saw that in indsutrial code people wrote __huge__
{
{,.n,mnm, } {knlkj lk jjkl with block everywhere}
{,.n,mnm, } {knlkj lk jjkl with block everywhere}
{,.n,mnm, } {knlkj lk jjkl with block everywhere}
{,.n,mnm, } {knlkj lk jjkl with block everywhere}
{,.n,mnm, } {knlkj lk jjkl with block everywhere}
}
So I hope that I convince you. I will try to came up with a change ste that
REMOVE this anthrax from Squeak!!!
Stef
More information about the Squeak-dev
mailing list
|