For instance, if you add this mehod:
CVLambda>>pure
^ CVPureLambdaBuilder createProxyFor: self
Then you can build lambda with guarantee that you create a lambda,
even if CVLambda(or its superclass) responds to a message you sending.
For instance:
CVLambda one two selector
returns #two
But
CVLambda one two pure selector
returns ((<#one> #two) #selector)
You can even send:
CVLambda foo bar pure doesNotUnderstand: #bum
and it will return:
((<#foo> #bar) doesNotUnderstand: #bum)
Of course, this hacky class will work in squeak only. Because
implementation depends on VM.
--
Best regards,
Igor Stasenko AKA sig.
CVLambda foo bar wrappedUntil: #printString
so, it will remain wrapped with proxy until #printString message is sent to it.
Too bad, its mostly unusable in such form, because there are many
places with loops, which enter recursion.
And of course, because control flow optimized by compiler, like
#ifTrue:ifFalse: or #to:do: , which can't work with anything except
booleans or integers :)