Shrinking

SmallSqueak smallsqueak at rogers.com
Mon Aug 30 08:00:44 UTC 2004


Thanks, Pavel. Now my mind is refreshed .

I must seriouly learn Smalltalk really soon now,
can't afford to wait for a SuperClean (TM) kernel.

BTW, did you have a chance to look into MVC codes,
Do you have anything to complain ?

I heard tons of bad thing about Morphic but not 
much about MVC. 

Is it because not many people are using MVC or 
because MVC code is of high quality ?

Thanks for your time and explanations.

Cheers,

PhiHo.


> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On 
> Behalf Of Pavel Krivanek
> Sent: Monday, August 30, 2004 3:18 AM
> To: The general-purpose Squeak developers list
> Subject: Re: Shrinking
> 
> > So, this is a Smalltalk's feature ?
> >
> > It's rather strange and amazing to me.
> 
> Yes, it's basic feature. Look at this code:
> 
> | var |
> var := 'string' factorial.
> [ var Smalltalk ] System.
> 
> This code is valid even though factorial isn't method in 
> class String, Smalltalk isn't message selector but global 
> variable, System isn't message selector nor global variable - 
> it's only an existing symbol.
> 
> But this lax control has very good reasons.
> 
> > Do you have a pointer explaining this behavior and how does 
> it work ?
> >
> > Does it have anything to do with late binding ?
> >
> > When will the missing selector and its implementation be 
> discovered ?
> 
> It's simple. When you compile a method, you create a 
> CompiledMethod instance. It contains an array of literals - 
> in this case it's symbol #factorial, string 'string', symbol 
> System and symbol Smalltalk.
> 
> In bytecode you only tell - you've got an object on the top 
> of the stack.
> Send a message identified by literal #3 to it. If the called 
> object doesn't know this method, it generates an exception 
> MessageNotUnderstood.
> 
> Smalltalk is an incremental system. When you write a method, 
> you don't know all classes and messages present in system in 
> time of execution. It gives you amazing freedom but you've 
> got to test your programs accurately.
> 
> Pavel
> 
> 




More information about the Squeak-dev mailing list