On 24 Mar 2014, at 11:51 , Pavel Krivanek <[email protected]> wrote:

> Who can find the most useful usage of this?
> 
>       thisContext instVarNamed: #receiver put: 42.
>       self factorial
> 
> GOTO statement in Pharo:
> 
>       FileStream stdout nextPutAll: 'Hello world'; lf. 
>       thisContext jump: -12.
>       
> Let's collect the next ones :-)
> 
> Cheers,
> -- Pavel


evaluator: aMethodBody
        "Uses a lightweight class to provide instance-specific value.
        |lightWeightClass |
        lightWeightClass := self class copy setSuperclass: MyBaseClass.

        lightWeightClass compile: aMethodBody classified: 'accessing'.
lightWeightClass adoptInstance: self.

evaluate: someThing
        “Will be replaced by specific behavior at runtime if appropriate”
        ^true

Because, well, storing a block and evaluating that, is too much overhead.

Cheers,
Henry

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

Reply via email to