Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Object Oriented Orientation

by jdrago999 (Pilgrim)
on Aug 03, 2011 at 18:20 UTC ( #918352=note: print w/replies, xml ) Need Help??


in reply to Re^2: Object Oriented Orientation
in thread Object Oriented Orientation

This might be sound advice ... in a suitable context ... but you are unwittingly taking for granted that the programmer is doing client-side scripting!

You're absolutely right. I am making an assumption as to the environment (server-side, client-side). That assumption may be incorrect.

I understand that the OP is looking for advice on what language to learn so that they can better understand OOP in general. Classes, interfaces, overridden methods, public/private/static/protected members, inheritance, polymorphism, encapsulation, etc. Yes it's clear that Perl has all of those things (and then some) but what isn't always clear is how Perl's way (if there is such a thing) and the Java/C#/C++ way line up together. The keyword "private" for example is "my" in Perl (sort-of). Those other languages have keywords while Perl has idioms and other tricks to Get The Job Done.

For someone who already understands OOP quite well, Perl's power can be magnified by a factor of magnitude. You could say the same thing for those who have a firm grasp of functional programming. Having previous experience with Perl may help the OP learn traditional OO practices in a language more closely-aligned to Java (such as ActionScript 3) because similar concepts -- though with different spellings -- can be detected in both.

And let the record show that programmers can write really-good or really-awful code in whatever tool they choose to pick up.

Aye. "That...is the sound of inevitability..."

Replies are listed 'Best First'.
Re^4: Object Oriented Orientation
by chromatic (Archbishop) on Aug 03, 2011 at 20:06 UTC
    Classes, interfaces, overridden methods, public/private/static/protected members, inheritance, polymorphism, encapsulation, etc.

    Only two of those things are important to OOP, and arguably only one is vital.

      Only two of those things are important to OOP, and arguably only one is vital.

      I suppose you are referring to polymorphism and encapsulation.

      Everything else in the list are simply common ways to implement those two aspects of OO. You are absolutely correct.

        You are absolutely correct.

        I'm glad someone else agrees!

        That's why I question the recommendation to use Java to study OO. Certainly you can write good OO code in Java (I've seen it; may even have written it once or twice), but the language goes out of its way not to encourage that.

        Some sort of combination of Smalltalk and CLOS would fare much better, but Perl 6 is rather impractical for many uses and there's no "Learn OO with Moose" guide yet.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2020-07-03 20:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?