compiling blocks

David Farber dfarber at numenor.com
Tue Apr 28 22:28:54 UTC 1998


>Well, you could try 
>
>    [:foo :instruction | foo perform: instruction],
>
>then call the block like
>
>    thatBlock value: someObject value: #bar.
>
>Or, if you need the possibility of multiple arguments:
>
>    [:foo :instruction :arguments | foo perform: instruction 
>                                        withArguments: arguments]
>
>And call it like:
>
>    theOtherBlock value: someObject 
>                  value: #inject:into:
>                  value: (Array with: 1 with: enumBlock).
>
>
>These are a little simpler than using Compiler, but can allow a fair
>amount of generality.

hmmmmm....what kind of performance are we talking about here? just looking
at the simple cases where i want to do this, it looks like an easy
half-dozen invocations of the block. in the more common, complex cases, it
looks like there could easily be hundreds or thousands of invocations.
that's why i'd like to do the compiling up front.

dave

--
        j. david farber
    oo architect+mentor
numenor labs incorporated
in sunny boulder colorado
    dfarber at numenor.com
        www.numenor.com





More information about the Squeak-dev mailing list