in reply to Re^3: Doing "it" only once
in thread Doing "it" only once

jdporter,
See my reply to the AM.

Paragraph added
What are you calling my proposed solution? I have not provided any solution. I have outlined a functionality that does not exist and asked for people to think about how they would use it if it did.

I included the original example just so people could get an idea of what I was talking about. I wasn't hoping for people to provide solutions to specific cases but to think about what they would do if they had a built-in general purpose way of identifying code that once executed would disapear. So far, optimizing looping constructs appears to be the only application but I can't believe that's the only one.

Cheers - L~R

Replies are listed 'Best First'.
Re^5: Doing "it" only once
by jdporter (Paladin) on Sep 21, 2005 at 18:01 UTC
    What are you calling my proposed solution?

    I was referring, however inaccurately, to "the following inelegant code".

    FWIW, lambdas are one way I typically address the need for dynamically replacing code at runtime, just as in your... "inelegant code" (for lack of a better name). In larger application contexts, object-oriented solutions are probably better, IMO.