Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Just read "How OOP is like Japanese food". Burke says: These are both bad things, and even wanting them is a sign that everything is just wrong. And the OOP equivalent of those danger signs is, of course, iterators. [Except in streams!] He does not go on to substantiate this comparison. I would like to hear any justification for this opinion.
    Yet another JAPH
    • I was bitter about a run-in with a horrible system that couldn't be bothered to return a simple list (because lists aren't OOey! so say the VOICES!) and so returned an iterator object. So it was real ugly to deal with, instead of how pretty a simple foreach($thing->woozewuzzle) would have been.

      I think that's what I meant.

      Montreal was in the middle of an unliveable heat wave, so as I was giving that talk, I could barely stand up from heat exhaustion. Global warming is fun!! [nytimes.com]

      • Heh. But $thing->woozewuzzle->loop(sub {...}) isn't exactly tricky.

        Let me guess; that's not the kind of interface the thing provided.
        • Not tricky, but uglier than sin. That kind of nonsense is what happens when your language implemented OO with the 80/20 rule. Cleanly integrating iterators was the 20/80 that didn't get implemented.

          --Nat

          • Point. This is where Smalltalk syntax starts to win:
            aCollection do: [ :each | each someMethod ]
            Should look lots nicer in Perl6 too:
            $a_collection.do({.some_method })
            Hmm... I wonder if you'll be able to dispense with the parentheses there...