On 24 Mar 2014, at 11:51 , Pavel Krivanek <pavel.krivanek@gmail.com> 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