in reply to Filter objects?

Couple of things:
  1. Does Java considering more things as object than Perl? No, this question is even irrelevant to any language, whether a thing is an object is really a design consideration, oppose to a language specific issue. From a more broader view, any thing that is an object in the real world, can be extracted as an object in your virtual world, the computer world. Again, this is 100% a design choice, nothing to do with language.
  2. Whether filtering is an object in Perl? Have said point one, this question should really been divided into two questions: 1) Whether there is the concept of "filtering" in the real world? yes, and a lot of them for different purposes. You may want to filtering an incoming TCP stream, and only grab those packets you wanted; You want to filtering an image and only grab a particular part you wanted; You may want to filtering all CPAN modules, and only grab those under Win32::GUI, this goes on and on. Generally speaking, in real world "filtering" means to generate a sub set of a whole. 2) Do we have "filtering" modules in Perl? Well, as I said depends on what you want to filter, and how you want to filter them, CPAN is always there.
  3. Conceptually XML can be understood as a way to persist your computer object, or on the other hand, a way to describe your real world object. It is alright to use XML format store your object. Again, this is not related to language choice, Perl, Java, or whatever.
  4. The difference between Java OO and Perl OO is not at the conceptual level, but rather at implementation level. I agree that Java has a more mature implementation of OO, but there is nothing stop you from do what you want in Perl, especially this "filtering" thing.

Replies are listed 'Best First'.
Re: Re: Filter objects?
by clairudjinn (Beadle) on Jan 28, 2003 at 22:18 UTC
    >1. Does Java considering more things as object than Perl? No

    I'm not sure I agree with this statement, even with its follow-up. In Perl, everything can be implemented as an object if you are willing to do the work; a great example of this is tied stuff. In java, everything short of base types is an object, and even these base types have optional classes built into the language core.

    Offhand, my uneducated opinion is that applying strict filters to objects is more instrinsically accomplished with java, with its strong typing, single inheritance, and enforced method signatures, as opposed to Perl with its vague typing (scalar, list, boolean, void), multi-inheritance (use base class1, class2...classn), and pathetic proto-typing. Don't get me wrong, you can do it all with Perl, but it's not built in nearly as strongly to the language itself. If someone wants to kick the crap out of the above assertions, please be my guest. :)

      No, I have no problem with your assertion. On the contrary, I fully agree with you.

      At the implementation level, Perl only supports very primitive OO concepts, and it is pretty much hacked for the sack to be modern.

      Java is OOO, "OO"-oriented. It is based on OO methodology, it is almost a full (there are still gaps) implementation of OO methoddology, and it solely exists for OO.

      Even c++ is not that OOO. When you write code in c++, you can choose not to have even a single class, but in Java, at least you have to have at least one class, (although a bad Java programmer can put everything into one huge class, and all code into the constructor of that class, that's just the bad judgement of a single person;-)

      When I replied to the original post, I am more focused on a conceptual level. What I dislike the most is that, the author of the original post clearly mixed OO design with specific languages. (I dislike the idea, not the author, make this crystal clear)

      OO is not a language, it is a design methodology, language is just the implementation of the idea, not the idea.

      There is no such question as whether Perl have the filter object. Filter is an object, this is a given, and it is a reflection of the real world. It can be implemented by using Java, as well as using Perl.

      Of course, on the other hand, When Perl can make it, Java can make it really gracefully, and make it into a beauty. I don't have problem with this assertion, not at all ;-)

      I love Perl, but not a fundamentalist.
        I probably didn't explain myself clearly in the original post. I understand that OO, as a method, is language independent. However, the languages differ in the way they normally are used to achieve OO.