Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re: Hmm...

by bwelch (Curate)
on Sep 21, 2004 at 17:25 UTC ( #392719=note: print w/replies, xml ) Need Help??

in reply to Hmm...
in thread "if" Considered Harmful in OO programming

Well said! Objects are good when they help.

When I was learning java and OOP, it was fun. However, it was soon easy to use OOP features where they really weren't helpful just to 'use the advantages of OOP', leading to code that wasn't good.

All things in moderation...

Replies are listed 'Best First'.
Re^2: Hmm...
by pdcawley (Hermit) on Sep 26, 2004 at 21:46 UTC
    You're not railing against the OO way of doing it, you're railing against the idiotic Java way of doing it. Take a look at Smalltalk, where even the simplest 'if' statement is implemented using a message polymorphism on the Boolean class for examples of this sort of thing Done Right.

    Of course, you can only really do it right if you're in a language which has blocks/anonymous subroutines, which is where Java falls down.

Re^2: Hmm...
by radiantmatrix (Parson) on Sep 23, 2004 at 15:40 UTC
    All things in moderation...

    I have a close friend who gave me the best advice. She's a nutritionist, but the idea applies to most situations:

    Everything in moderation, including moderation.

    require General::Disclaimer;

    All code, unless otherwise noted, is untested

    "All it will give you though, are headaches after headaches as it misinterprets your instructions in the most innovative yet useless ways." - Maypole and I - Tales from the Frontier of a Relationship (by Corion)

      Moderation in moderation? If that allows for running amok periodically, I'm all for running amok.


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://392719]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (6)
As of 2023-12-10 07:23 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (38 votes). Check out past polls.