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

If you rework this as actual perl code, its even possible to do today, with no changes to the perl parser. Really though, Limbic~Region should just be using lisp if he wants to have such flexibility. If this is too much overhead, the ifonce() function could be inlined like I described in my other node.

sub ifonce { my ( $test, $block, $else ) = @_; if ( $test->() ) { $block->(); # Perform the appropriate B magic to remove this function call + from execution. } else { $else->(); } }

Replies are listed 'Best First'.
Re^3: Doing "it" only once
by Limbic~Region (Chancellor) on Sep 22, 2005 at 19:10 UTC
    diotalevi,
    I never said I was for or against this functionality, but why shouldn't it be considered for inclusion in Perl6? While I have already had this conversation with you in the Chatterbox, I believe it is worth repeating here for the sake of others.

    The meditation is about the possibility of Perl6 having the ability to modify the optree (or its equivalent) while it is running as core functionality and what you would do with it if it were available. The majority of the monks have missed this because they apparently focused on the code and didn't bother reading the commentary.

    You have stressed that you think I should learn Lisp before asking such questions and I would argue that you should read what I wrote and not assume to know what I was musing about. I respect you and your abilities a great deal, but I am probably going to come off sounding like a jerk. Regardless of our differences in opinion - thank you for your contributions.

    I know that there are many ways of achieving the same functionality currently and even included an example. Perhaps that was my downfall. People have been so eager to point out more ways or to recommend using another language that they have failed to see the forest through the trees.

    I was taught in school that the final paragraph should always bring the point you are trying to make home. I think I did that and have no explanation as to why so many people missed it.

    Cheers - L~R

      I was taught in school that the final paragraph should always bring the point you are trying to make home. I think I did that and have no explanation as to why so many people missed it.
      That's artificial, i.e., not a valid expectation in most contexts, including this one. You were expecting everyone to read all the way through - some do, and some don't. Sometimes your first sentence will generate an idea in my head that has to be followed now, before the shine wears off.

      On the other hand, I'd hazard that some of the "misplaced" responses are due to the respondents' lack of Perl6- or optree-fu, and they replied according to their own experience.

      Your acceptance of all well-intentioned responses, and gentle prodding in the direction of interest, has already resulted in more on-target replies.

      -QM
      --
      Quantum Mechanics: The dreams stuff is made of