Converting blocks to methods

Martin Beck martin.beck at hpi.uni-potsdam.de
Sat Jan 19 16:42:28 UTC 2008


Hi there,

has anyone tried to accomplish something like

MyNewClass addMethod:#doSomethingWith: with: [ :arg |
	Transcript show: arg].

MyNewClass new doSomethingWith: 'Hello World'.

in Squeak? This would mean, to convert a block into a method, thus
changing the hole semantics. Outer temporaries or other variables are of
course forbidden. Literals have to be fetched out of the defining method
and brought into a new compiled method and so on. Or perhaps there are
other possibilities? Any ideas?

Regards,
Martin



More information about the Squeak-dev mailing list