For Programmers: Free Programming Magazines  


Home > Archive > Smalltalk > December 2007 > Re: FINALLY: Another language adopts Smalltalk's keyword -syntax









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: FINALLY: Another language adopts Smalltalk's keyword -syntax
Paolo Bonzini

2007-12-18, 7:21 pm

> > I don't see how weak typing helps or hinders the problem that you
>
> The problem comes with the change to the conflict between the required
> change to the Smalltalk dispatch mechanism, and op names.


I don't see the problem. I could modify the Smalltalk compiler to
sort the keywords lexicographically, and things would still work
(barring conflicts).

> monster moveLeft: distance at: speed
> monster at: time24Hour moveLeft: distance
>
> The existing dispatch scheme is sequential, so the following are
> differentiated :
>
> m moveLeft: 5 at: 5
> m at: midnight moveLeft: 5


Sure. Thanks for this example, it is very clear (calling methods like
that in Smalltalk would be considered very poor style, but that's okay
for the sake of exemplification).

However, this is not a problem with Smalltalk vs. Lisp keywords; it's
just the lack of multimethods.

Paolo
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com