in reply to Perl as one's first programming language

Most of the replies so far seem to be focusing on end point application of the learning process mediated by one of: static/dynamic typing, abstraction level or mathematical purity of the language's syntax. To a large degree none of these are important. Consider what needs to be taught to get someone started in programming:

Before the student can do anything else she has to be able to enter a program (I'm not talking about one liners or evaluating expressions here btw) and have it do something that he can see. That involves writing some "code" and "running" it. Very often it also involves figuring out why it didn't do what was expected - "debugging". So far all that has been described is what is required for a "Hello world" program, and very important it is too!

Once the student gets anything at all running the teaching/learning process tends to head off in myriad directions. But the fundamental skills learned in the next stage involve understanding and managing program flow along with some understanding of storing and manipulating data. One can go a long way in acquiring those skills before one needs to know anything about getting data into the program!

So what's important for teaching programming? Well, to a degree it's the tools you use. Running from a command line and switching between that and an editor gets in the way of teaching rather. Using an editor with a "command" window or an IDE that can run the code you are looking at helps. Being able to step through the code a line at a time and inspect the contents of variables easily helps a lot. Actually teaching programming is more about teaching debugging than writing code in the initial phases!

Minimizing the amount of extraneous cruft is important too. Less cruft means tighter focus and a less steep learning curve. It doesn't matter how rich a language is here - just how much required cruft there is (Perl has almost no required cruft). Cruft can take many forms - syntactic cruft is obvious, less obvious are paradigms that don't map on to the student's current experience - Forth with it's stack and dictionary paradigms is not a good teaching language, Lisp with it's list paradigm ain't so good either.

A good teaching language for programming is one that provides program flow control in ways that can easily be mapped to student's current knowledge and has suitable tools available for program generation, execution and debugging. It also provides basic I/O in a simple fashion and doesn't need extra cruft in the form of required syntactic sugar or an interesting programing paradigm to get basic stuff done. Perl seems to fill the bill pretty well.


Perl is environmentally friendly - it saves trees
  • Comment on Re: Perl as one's first programming language