|Welcome to the Monastery|
RE: Perl as a first languageby ferrency (Deacon)
|on Aug 22, 2000 at 20:35 UTC||Need Help??|
I think that in order to answer "What's a good first programming language" or "Is X a good first programming language," we need to know more about the background and goals of the person who will be learning to program.
This can be difficult to do when designing an entry-level programming class for a group of students with different backgrounds and goals, but it is not always impossible (for example, an entry level CS class is likely to use a different first programming language than a web development programming class). And, it's very important to take these things into consideration if you're trying to go it alone and teach yourself how to program- one of the most common reasons I see this fail is attrition due to lack of interest.
Different people come to programming from different backgrounds. Leveraging someone's previous experience can make it easier for them to learn how to program by either building on knowledge they already have, or by improving their attention span by keeping the experience interesting. For some people, working with a graphical system can keep things interesting. For others, working with something that "looks almost just like a unix shell" is better. And those coming from an html web-development environment would be most comfortable working with something that looks "almost just like HTML."
At the same time, what the person intends to do with their programming skills is also important. If you're teaching future Computer Scientists, it's probably more useful and important to start with formal (but less frequently used in Real Life) languages with stricter syntax, such as Lisp and Pascal. If you're teaching a system administrator how to make their life easier, through automation of common tasks, but they never really intend to move on to large-scale development projects, then you'll never get anything accomplished with LISP (okay, except maybe in Emacs). Likewise, a web developer- if all they really want to do is spice up some otherwise boring web pages, knowing that you always have to predeclare variables and functions in Pascal isn't really going to help much.
It's probably heresy in CS circles to suggest that It's Okay to leave gaps in peoples' programming knowledge, that It's Okay to cut corners in order to facilitate Getting The Job Done. Teaching a web designer PHP as their first programming language will probably leave many lessons which would later need to be unlearned if the person eventually decided to go into Computer Science. But not everyone wants or needs to be a computer scientist just to write useful programs (or, to write programs Well, within a certain domain).
With all of that in mind... "Is Perl a good first programming language?" I'd say Yes, sometimes, for some people.
One poster commented that it's too easy to shoot your foot off in Perl if you're unexperienced. I claim, it's easy to shoot your foot off in Almost All languages. Perl has the benefit that it's less likely to crash your machine and require a hard reboot to recover, when you do shoot your foot off. And because there's no explicit compilation stage, it takes less time to sew your foot back on and try again.