What are the advantages and disadvantages of Perl for OOP?

I was wondering how well Perl would work for OOP programming. What are the advantages and disadvantages of using Perl for OOP, and if there are disadvantages, are there any way back to code the codes around them? Any information that Perl is currently in use, as well as how well Perl can be paid in the future, will also be appreciated.

+7
source share
3 answers

OOP is not the end, but a means to an end. Your question is so broad that it is practically meaningless.

If you write Perl programs that allow gigantic financial institutions to squeeze extra billions of dollars in profit from their portfolios, you will be paid beautifully.

If you write Perl programs that solve problems that are difficult for other programmers to solve, you will be pleasantly paid.

If you write Perl programs for handling web contact forms for simple websites, you won’t get paid either.

If your programs implement encapsulation, polymorphism and composition well, they will be easier to understand, expand and correct than not. This will give you the advantage of doing better and faster, which will bring you a bonus for programmers who throw things against the wall until something gets stuck.

Perl gives you freedom in how you create solutions. With freedom, risk and responsibility arise. This may be good or bad depending on your personality.

Regarding OOP:

  • Perl is concise.
  • Perl does not require you to consider everything as an object.
  • Perl does not force you to use inheritance as the primary mechanism for reusing code.
  • Perl makes using composition to reuse code very easy.
  • Perl's lexical features and locks make encapsulation easier.
  • Perl allows multiple inheritance.
  • Perl allows operator overloading.
  • With Perl, you are not limited to using the “true design principles” that someone decided ten years ago.
  • Of course, I forget many other suitable bits.

As before, you put the cart before the horse. First you must fully understand OOP without reference to any particular programming language.

Perl provides many alternatives for web applications. Catalyst is a really good structure. Dancer makes it easy to express the functionality of your web application. Plack makes it easy to deploy it.

You determine which part of the OOP methods to use for these frameworks.

I recently fell in love with a combination of Moose and Dancer .

Note. Given that you are just starting to learn, I would recommend (despite the assignment of classes) that you are not too worried about language comparisons. Instead, open yourself in different languages. This day and aged, it is as simple as waiting a few minutes to download to start. When I first decided to learn how to program (a little less than 30 years ago), paper and pencil were the only way to write programs, and I had to simulate the output of a program using paper. I know, I know, in the mountains in both directions and that’s it; -)

So, an experiment. Do not commit. You will understand the comparative advantages and disadvantages of languages ​​by experimenting on your own. Try to write the same application with different technologies. Make the task easy.

My first attempt at programming in Perl is still available online with warts and everyone. The reason I started with this was pretty simple: I wanted to do something simple and something that would give me happiness.

Try something simple whose completion will give you satisfaction. Try the same with as many languages ​​as you like. Give Erlan a shot.

The labor market will be different by the time you graduate from college. The best preparation for college is to have a broad understanding so that you are not stuck in the little things, but you can do the tasks that others will choose for you.

+23
source

You asked: "How well can a Perl programmer be paid in the future."

This reminds me of this story about a guy who went to a fortuneteller:

Guy: What will my future bring? Prediction narrator: Looking into my crystal ball, I see many, many $ s. Guy: Oh, I'm going to make a lot of dollars !?
Representative of the prediction: No, you will become a perl programmer.

+13
source

Nate - regardless of whether you learn Perl or not, is just a very small factor regarding jobs.

A specific language - 10-20% of what you need - the rest is web development, database development, network programming, software development, data structures, algorithms, patterns and paradigms (for example, OOP versus functional or declarative etc.) .d ...), communication , presentation skills, etc.

That said:

  • Perl is a great language to help you introduce all of these concepts. As discussed in recent threads, it MAY teach you much more OOP than Java (because Java implements only some aspects of OOP), and Java cannot teach you functional programming at all (which you need to control JavaScript).

  • Knowing only Perl is likely to make your work more diligent. There are not many tasks that require Perl and only Perl (there are some more, just not many).

    On the other hand, there are MANY Fewer good Perl developers than, say, Java monkeys, so if you are really good at Perl, your ratio of jobs and available set of talents can be really better than in other languages.

  • There are many more jobs requiring multiple languages. Therefore, you obviously need to learn both Perl and other languages ​​(C # or Java seem like good rates for employment).

  • To repeat above - MAIN (80%) is a factor of how easy you can find a job and how much it pays, NOTHING has to do with whether you want to know Perl or any other language, but knowing the other things listed above, and your the ability to learn both business knowledge and new languages.

+13
source

All Articles