in reply to Re: Why perl is more OO than C++ or Java...
in thread Why perl is more OO than C++ or Java...
I think what a lot of people are forgetting is that in essence, Perl is exactly as OO as for example Java, and possibly even more so. The reason I like Perl more than any other language is that Java for example, has a lot of stupidities that annoy the hell out of anyone who is trying to use it, for example having "string" as a primitive text string variable, and "String" as a Object designed to manipulate the "string" type, but is completely uncompatible with string unless you use the built in functions. With Perl, we manage to get over that sort of stupidity, whereas Objects are exactly the same as scalars - they look like scalars, but you can call subfunctions to them with things like $foo->bar(); This is pretty much the same because in Java Objects are just like other variables.
Now, this does not prove my point. Lets see if this will:
In Perl, we allways have a current package, as in Java, we allways have a current class - Perl is better and easyer to code however, because we don't have to write 4 lines of Perl just to be able to start writing Perl code, while Java people do - class foo { public void main() { } } being the bare minimum IIRC, while with Perl there is no minimum - just the #!/usr/bin/perl line, which is also optional to some extent.
We allways have the main:: module, and that gives us a "class main" in a way.
I'm not going to go on and on about this and that feature and/or bug in the implementation of Perl OO support, but I do think that Perl is in fact more OO than a lot of languages, without people even having to know that it is OO. And so what if people have to learn the language a bit better to be able to use those features? They're hackers, they're smart, they'll figure it out!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Why perl is more OO than C++ or Java...
by seesik (Initiate) on Sep 14, 2001 at 18:47 UTC | |
Re: Re: Re: Why perl is more OO than C++ or Java...
by feloniousMonk (Pilgrim) on Sep 15, 2001 at 01:50 UTC | |
by spm (Acolyte) on Sep 15, 2001 at 14:22 UTC |
In Section
Meditations