Slash Boxes
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.
More | Login | Reply
Loading... please wait.
  • Sometimes during a Perl class, I like to jerk the chains of the Java people who like to play OO-purist.

    I ask them "What methods can you call on 1?". They look at me dumbly for a bit. Sometimes they say something about creating a new object, and I have to reinforce the statement: "No, all you get is 1. What methods can you call on it?"

    It ends up the same: "I guess Java isn't an object oriented language then."
    • That's a classic example of people misunderstanding the terminology. Even my brief exposure to Squeak is showing me more. While I'm unsure of the process by which (foo > 5) creates a Boolean object in Squeak, it's now clear how the ifTrue:ifFalse messages work and why the traditional if/else statements are procedural in nature. It's not clear to me if mixing a bit of procedural code with OO code is bad, but then, I'm still exploring this. I suspect that the pure OO approach has benefits that get arou

      • The object to which methods are sent is always the left one. There are no prefix operators. Everything is left to right. So, in
        foo > 5
        you'd look for a greather-than binary message in the class (and superclasses) of value currently held in the foo variable. If it was:
        5 < foo
        you'd look for a less-than binary message in the class of 5 and its superclasses. Yes, a wacked-out system could make those do different things, but "with great power comes great responsibility".
        • Randal L. Schwartz
        • Stonehenge