Quick comparison of two Namespaces proposals

Igor Stasenko siguctua at gmail.com
Wed Sep 19 20:55:16 UTC 2007


On 19/09/2007, nicolas cellier <ncellier at ifrance.com> wrote:
> more over, could be a syntax rule:
>
> capitalized message: answer (self namespace at: message)
> non-capitalized: traditional message send.
>
> we could as well write (self Array new: 4)
>

Well, we don't need to change anything to use lately bound names/classes.
You can always introduce messages in your classes, like
#myArrayClass
#myPointClass e.t.c.



>
> Tansel a écrit :
> >
> >  >  Array is a class, not a message. This is /not/ elegant and simply
> > doesn't make sense. This is my last comment on this approach.
> >
> > That's not strictly correct. In the given example it is a message: you
> > are simply asking the given namespace to answer the named class, and the
> > only confusing thing about it is the message is capitalized.  What if it
> > were written as "Kernel array new:4"?
> > It is already possible to create a capitalized message in Squeak, we
> > just avoid it because it gets confusing. However in the given context I
> > simply applaud Dan's genius and I second that it is a simple and elegant
> > solution. For the more conservative approach I would have no problem
> > with a namespace creating a non-capitalized accessor message for the
> > given class but that could cause other confusions.
> >
> > Tansel
> >
> >  >  +10000 for:
> >  >  self add: (Kernel Array new: 4).
> >  >  This mechanism preseves the elegant foundation of Smalltalk:
> > 'Everyting is an Object, which receives a messages and returns an object'.
> >  >  In this (Dan's ?) solution, the implementation is late bound and can
> > use the same lookup algorithm as used for messages .
> >  >  The other solutions lack this elegance.
> >
> >
> > ------------------------------------------------------------------------
> >
> >
>
>
>
>


-- 
Best regards,
Igor Stasenko AKA sig.


More information about the Squeak-dev mailing list