in reply to How about class Foo {...} definition for Perl?

I also use this to introduce Perl developers that don't know very well OO in Perl, but know in Java, to the OO development, since everything that we develope need to be in OO style.

What's the benefit of using Perl then? You might as well use Java.

Any good developer should be able to pick up the syntax — and idioms — of a different language fairly soon after he understands their relationship to the actual concepts.

With that said, I do like the approach of writing out the generated files instead of running the filter on each invocation. Sometimes that kind of code generation works out really well.

  • Comment on Re: How about class Foo {...} definition for Perl?

Replies are listed 'Best First'.
Re: Re: How about class Foo {...} definition for Perl?
by gmpassos (Priest) on Jan 17, 2004 at 23:24 UTC
    This is not about the benefit of use Perl, but the benefit to use a developer that work well on CGI, to work directly with the other developers that work well on Perl OO.

    This is all about integration of different groups of work.

    Graciliano M. P.
    "Creativity is the expression of the liberty".

      I don't think it will have that effect, though. If I understand you correctly, you have two groups of people: those who understand OO Perl and those who don't — and the latter group understands OO Java.

      Your proposed solution is to create a third language, so that the second group of people don't have to learn OO Perl. So now you have people in three groups: those who know OO Perl, those who know Java-ish OO Perl, and those who know OO Java. The first group may be able to debug the generated code, if they know the Java-ish language. None of the other groups would.

      Me, I'd just teach everyone who needs to write OO Perl OO Perl.

      Update: But you must teach them something now! Why put an additional step in there?

        I know OO Perl, use it, but for fast code generation I use Class::HPLOO, than I convert it to a normal Perl Module and release it. This is about produce fast the code too!

        Well, about the different groups, and teach, well, this is about money too, and time is money. They will learn OO Perl with the time, since they will start to work more with Perl. With Class::HPLOO, just from the begin I can count with their work, and my approuch is working, very well.

        Graciliano M. P.
        "Creativity is the expression of the liberty".

        Answering your update:

        You are right. But I'm always teaching Perl, and the time show me that we can't force someone to do something, the things need to be natural. I'm just trying to let to the developer a natural way.

        If you get someone that know very well the OO of Jave and show the OO of Perl, it will be scared. We know that are silly things create the method new() and need to declare $this, but for some one that think that have this is THE OO, not. Soo, I show how they are silly with Class::HPLOO, since the resources that Perl has are much more important than just OO.

        Graciliano M. P.
        "Creativity is the expression of the liberty".