|Syntactic Confectionery Delight|
(jcwren) RE: (2) Perl as a first languageby jcwren (Prior)
|on Aug 22, 2000 at 23:54 UTC||Need Help??|
It depends entirely what you intend to do with your life. As I've said before, you can't write operating system code in Perl (barring the silly, impractical scenarios that have been previously discussed). If you want to write Windows applications, Perl is not a good language. Not so much as a language in itself, but the lack of easy interface to the underlying windows functions.
You *could* write a complete windows app using Win32::API, perhaps, but why? In addition, Windows makes use of many callback functions, and I don't know how well these really port to Perl. Implementing an event driven system in Perl would seem to be a lot more difficult, considering the operating system has certain expectations. And last time I checked (and this may have changed), you couldn't call straight back into a Perl subroutine. At least, not without writing some XS code to manage it all. Which starts to get away from the point of writing in Perl.
Perl also lacks an effective method for distributing and installing Perl as part of an application. If someone has Perl (and assuming you don't have version dependencies), you'd be OK. But since it's not something that's installed as part of the O/S, and the fact that it's nowhere as easy to install as copying a DLL file out, it makes for a painful application installation.
Also, IMHO, Tk isn't there yet. And for most Windows users, it doesn't look enough like Windows to make them happy. In fact, one of the points of Windows (and MacOS on a MacIntosh) is to give users a common user interface for applications. Now I'll be the first to admit that some people can't begin to grasp this, and certain basic functions like copying a marked text block aren't control-C in applications. But, the window frame work is basically the same, and generally speaking, the underlying user interface is pretty consistent. With Tk apps, I haven't found this to be so.
Now, if you're going to spend your life not writing OS code for Linux, and not writing Windows apps, then yes, you may never choose to learn C++. Of course, the more languages you learn, the better a programmer you become. C++ teaches methodologies that are supported but not enforced by Perl. Perl has some powerful OO capabilities, but I believe that using C++ gives you better insight into them.
Perl is an excellent langauge for many tasks. It is not the solution to every problem out there (How many AI modules do you see for Perl? 1: AI::NeuralNet::BackProp). A good programmer recognizes when to use a given language for a given solution. Not beating every problem into submission would a tool that's not appropriate to the task.