in reply to Perl and Objects, how do you resolve the two?

As a good friend of frankus I follow his posts with interest, I am presently seeing a trend. I know him to be a very adept perl programmer and note he is trying to learn the complexities of OO programming. I find this heartening as a OO programmer myself.

I am worried however, I am worried about coupling any language and the oo paradigm (damn I hate that word) too closely together. I wrote a deliberatly contetious node a while ago where I claimed that perl is not OO, I continued to agree with comments from fellow monks that neither is java or C++. I say this as a very experienced java/C++ programmer. OO is a design concept that has support within languages. It is therefore not a good idea to start from a language and work back. Start with a design then apply the design to a language. The resulting code can use any feature of the language you so chose OO or otherwise, as long as it faithfully maps to the OO design.

I am not a fan of the syntax of OO perl so I tend to avoid it. I still write OO perl just without the OO syntax.

Start with analysis, try writing a UML / SM design for your next module then code based on that design. Ignore the OO nature of perl. Use the aspects of the language you know well. That will mean you are learning only one thing at a time. Once you have mastered OOA then move to OOD and try to use the OO aspects of perl, they are not to my taste but they are very complete and very usable. You will then fit them into your understanding of OO instead of trying to fit your understanding of OO into perls interpretation.

Question what you do, try to see under the hood of OO. It pains me how often I see great programmers missing the point of OO programming because they dont see past the fact that it usually requires more 30 chars to do what perl can do in 5 "Obviously, You Will Need a Java Course...". Sorry I have drifted from the point, I will leave it there and follow this thread keenly.
Regards

--

Zigster

  • Comment on Re: (Zigster) Perl and Objects, how do strongyou/strong resolve the two?