Fear and loathing of the "perification" of Smalltalk
Peter William Lount
peter at smalltalk.org
Thu Sep 13 15:56:38 UTC 2007
Igor Stasenko wrote:
> I don't see how [...] values can be implemented without modifying VM.
> You need to call some primitive to activate a block and execute
> statements.
Yes, exactly as I suggested.
> Of course, having a source(or parse tree) , you can parse
> it and then convert each statement in separate block and execute them
> one by one. Then you don't need to modify VM code.
Yes, you could do it that way, as Paolo and others including myself have
thought of.
> But speed ...
>
That is always an issue to be considered.
> Also, some use patterns don't fit the purpose and can lead to errors
> and undefined behavior.
>
Well, anyone can make spagetti of out any feature in a language.
> Consider following:
>
> block := [ | temp | temp := 1. temp:= temp+1. temp ].
>
> and somewhere later:
>
> result := block doInParralell
>
> Suppose you sending #doInParralell message to some unknown block
> (which contents is unknown at compile time). It's very interesting
> what results will be.
>
>
>
As always you need to be congnizant of what features you are using and why.
All the best,
Peter
More information about the Squeak-dev
mailing list
|