Let me make it clearer why Perl is the wrong tool for the job.
The exercise that had to be coded involved matrix calculations.
In Matlab or Octave, matrices are native datatypes, and a variety of useful functions are available for manipulating them. Sure, it is easy enough to write a Perl implementation of matrices and basic matrix operations. But the notation that you will wind up with will be more verbose, and you will be open to the possibility that you are getting wrong answers because your routines are wrong. Furthermore when you get to more complex operations, you won't know enough to, for instance, come up with a good way to compute the eigenvalues of a matrix. Matlab already has that done for you. (I can find ways to compute it. I doubt that I would do it nearly as efficiently and accurately as Matlab does. A student just learning the subject would not be expected to do as well as I can.)
There is great value in only writing the algorithms that you need without having to reinvent the wheel.
In Perl you can resolve that problem if you know about PDL. But PDL is an installation dependency that whoever is grading you doesn't know, and has to go through. And furthermore they don't know whether to trust it (is the bug yours, or PDLs?). Also if you run into trouble, they can't help you with it since they don't know it, and they likewise don't know if the bug is with your code, PDL or your understanding of PDL's API. There is a huge advantage to using tools that people around you are able to help you with. Perl isn't that tool.
Now C++ shares some of the disadvantages that Perl does. My guess is, though, that there is a standard math library that has been provided for C++ people. Any language with the right library gets back some of the advantages that Matlab has. If the instructors are familiar with it, it gets back most of the rest. (I would consider Matlab a better tool than C++ for this exercise - less conceptual overhead.)
Furthermore for a Perl fanatic, there is another advantage of not using Perl. It is very easy to become overattached to your favorite tool. Yes, we all know that you can pick up more tools, and skills should transfer. But making that transfer takes practice at translating from thinking in language X into thinking in language Y. Therefore forcing yourself to use a different language from time to time is a good way to make sure that YOU have the valuable skill of adapting to a new language/environment. |