in reply to Perl as one's first programming language

I think Perl makes a poor choice as a first language simply because it's too big. The size of Programming Perl alone is enough to crush dreams. Yes there are shorter books but none of them actually teaches you the whole language!

Starting on Scheme makes a lot of sense to me - I wish that's how I'd started, really. The interactive prompt is a great fit for learning along with a book and there's some great beginner materials out there for Scheme. The one downside is that for most working programmers Scheme is going to be essentially useless.

Starting with C, which is what I did, also has some strong points. Like Scheme it's a little langauge - K&R covers everything you need to know in around 200 pages. Better yet there's just so much C code around to learn from - pretty much everything that a computer can do has been programmed in C. And it's really useful in that we all work on C-based systems (like Perl and Linux, say) every day. Knowing how to read and patch them is a great tool, even if your every-day work happens at a higher level.

-sam

  • Comment on Re: Perl as one's first programming language

Replies are listed 'Best First'.
Re^2: Perl as one's first programming language
by sasdrtx (Friar) on Apr 08, 2008 at 00:51 UTC

    The size of the language is not relevant to the novice (or initiate). What matters is how much you need to know to start producing a functioning program, and how easy it is to incrementally learn more features. Perl is perfect on that count. PL/I and C++, on the other hand, are famous for producing astonishing diagnostics.

    Having a minimum amount of red-tape to get a "Hello World" program running is probably the most important thing for a fist language—especially to self-taught programmers. Perl is as good as it gets on that point.

    I don't think Perl should be the only language known or used by a professional programmer, but it's the best choice for non-programmers, because you can know as little or do as much as you could possibly want.

    For training a professional programmer, it's still the best choice. It allows you to start working on programming, rather than housekeeping, red tape, and such. That can be taught later, with C, and assembly. OO programming should come later. And I still believe in C++, but maybe Java will do. Maybe Perl 6 will do.

    sas
      I think you're overestimating how hard it is to write "hello world" in C. If I had my K&R around I'd quote a page number by which a student would be ready, I bet it's pretty low.

      And for Scheme, well, you just don't have a case. It can't possibly be easier to write a "hello world" than in scheme! You just fire up your interpreter and:

      guile> "Hello world." "Hello world."

      Scheme is not only a bazillion times smaller than Perl, it's also faster to get started in, with less syntax and house-keeping to learn.

      Ok, you've convinced me, Scheme is the perfect first language. Now if only I could go back in time and get started right...

      -sam