Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Re: Perl - Is it an OO Language

by krisahoch (Deacon)
on Aug 27, 2002 at 15:20 UTC ( #193189=note: print w/replies, xml ) Need Help??


in reply to Re: Perl - Is it an OO Language
in thread Perl - Is it an OO Language

This is the answer I was looking for.

I posed BrowserUK's bullet points to GURU_2. He then showed a Java example to me while outlined the four tenents he described in one section of code. It was 6 lines total and they were all easily read. Over the course of his demonstration he also said nearly verbatim what Abigail-II said here, and what ignatz said as well.

++ Abigail-II, BrowserUK, Merlyn, ignatz, Zaxo and others for your insight and help

Thank you very much,

Kristofer A. Hoch

Replies are listed 'Best First'.
Re: Re: Re: Perl - Is it an OO Language
by Anonymous Monk on Aug 28, 2002 at 14:42 UTC
    I draw your attention to charnos and merlyn's points above how even Java has jumped out of the "OO paradigm" to satisfy its own necessities.

    I find it fascinating that Guru_2 can write 6 LoC in java once you've done the importing and class declaration is there really that many lines left ;)

    Jokes aside, of course the lines of java was easy to read, many of the shortcuts in Perl do make the code less readable but removes unnecessary lines in the process and the readability over effeciency is a whole different debate that rages on.

    I would like to point out though that on the whole perl is run from the script and would ask you to try and read the java .class file that the computer compiles. Alternatively look at the tremendous number of issues surrounding a Java JITC (Just In Time Compiler), as many of these are memory inefficient and would quite hapily get kicked from pillar to post by perl. Don't get me wrong I find programming in Java fascinating and enjoy using it for different things, you could sit here forever pointing out the pro's and con's of each language when compared against each other.

    Do something unholy and post the lines of Java up that GURU_2 used in his example, and see what people post back with for a perl equivelent.

    --pray.

      Personally I find that given a little effort, you can balance Perl's brevity with readability. Certainly you need a proficient Perl programmer to be able to read the resulting code easily, but such a programmer can pick up the happenings very quickly. Java and many other languages on the other hand are invariantly verbose, which annoys me greatly.

      I realize there's things other languages are better suited for than Perl, but I'd gravitate to Perl just for its brevity, or to be precise, its potential brevity, even in those cases. When it takes only one or two lines to filter certain elements out of a complex data structure as opposed to 15, and when the entirety of a data munging algorithm fits on a single screen, I can simply concentrate on what the code is actually doing much better. But then, I'm a rather right-brained, whollistic thinker and work better when I can keep the entire big picture in my head at once, whereas more linear thinkers will likely be annoyed by the density of Perl. To each his own.

      Makeshifts last the longest.

      Unfortunitly I cannot post the code, because it is proprietary stuff.

      I can say that it is an advanced GIS system that cannot be easily converted into perl

      I do not want to get into a language war with this post please. I simply wanted to read what others think about perl as an OO language or not.

      Thank you

      Kristofer A. Hoch

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://193189]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2018-06-25 01:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (126 votes). Check out past polls.

    Notices?