Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Learning Perl as a First (programming) language

by FoxtrotUniform (Prior)
on Aug 02, 2002 at 16:39 UTC ( [id://187144]=note: print w/replies, xml ) Need Help??


in reply to Learning Perl as a First (programming) language

I think that Perl's a horrible choice for a programmer's first language: it does too much for you. The Perl hacker doesn't have to worry about buffer lengths, array bounds, keeping track of allocated memory, and so on, which makes it easy to develop habits that don't address resource allocation. Fine if you're hacking Perl, not so fine if you start writing C later on.

I have some personal experience to back this up, if you'll indulge me. I've TAed labs for an introductory software engineering course at my university: this is a student's first introduction to writing software, rather than using a procedural language. It's also their first glimpse of C. For a long time, the first-year courses were taught in Pascal; recently, they switched to Java. Students who learned to program with Java had much more trouble keeping track of resources (file handles and heap memory, for the purposes of this course) than the ones who started out with Pascal, and their code was brittle as a result. I attribute this to Java's "convenience" features (growable strings, garbage collection, etc).

The problem with teaching programmers Perl as a first language is that they will almost inevitably go on to write C, and their C will be buggy and insecure. I'd like to see Comp. Sci. majors around the planet start with an elegant, sane assembly language (MIPS and 68000 asms come closest to this ideal, IME), then move to C, then move to safer, higher-level languages. Like Perl.

On the other hand, Perl makes an excellent first language for people who aren't going to be career programmers: it's easy to get a lot done with only a little knowledge, which means less lag time between starting to program and solving your problems.

--
The hell with paco, vote for Erudil!
:wq

  • Comment on Re: Learning Perl as a First (programming) language

Replies are listed 'Best First'.
Re: Re: Learning Perl as a First (programming) language
by BorgCopyeditor (Friar) on Aug 02, 2002 at 17:55 UTC

    On the other hand, Perl makes an excellent first language for people who aren't going to be career programmers: it's easy to get a lot done with only a little knowledge, which means less lag time between starting to program and solving your problems.

    Thanks for making this distinction. I run a very small website that has to search a database of texts for its output, and then put that into an encoding that the user of the site can choose (there are different ASCII transcription schemes available for Ancient Greek that are alternatives when unicode support is not available).

    Perl enabled me to get this site up and running in a very short time. I'll never be a career programmer ("It is ... too late for me." -DV), but I'm very glad that Perl was out there. I've made a lot of stupid programming mistakes to begin with, but I'm learning, and I'm still interested. That's more than I can say about trying to learn Z-80 assembly language when I was 10. That put me off programming for a couple of decades.

    BCE
    --Your punctuation skills are insufficient!

Re: Re: Learning Perl as a First (programming) language
by Daruma (Curate) on Aug 04, 2002 at 23:18 UTC
    On the other hand, Perl makes an excellent first language for people who aren't going to be career programmers: it's easy to get a lot done with only a little knowledge, which means less lag time between starting to program and solving your problems.

    Like BorgCopyeditor, I realize this statement describes my relationship with Perl clearly and succinctly. I am not a career programmer. Rather, I stay on the fringes of programming: Oracle DBA training and consulting. Up until the past few months, I've basically read about Perl, written a few little utilities to help with my work and browsed Perl related websites.

    Although I can read code in many languages, and have been through the first few chapters of some of the Learn <language> in 24 hours, Perl is the first language in which I've written a useful application for my clients.

    I find Perl to be challenging and useful. I seriously doubt it will ever cease to challenge me. I know it will never cease to be useful for me.

    Perl as a very first programming language? With my exposure to other languages, I didn't consider myself completely green, although through exploring Perl, I've learned more about other languages. Should I start my children off with Perl? I think I just might... In a few years, they'll be teaching me!

    -Daruma

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://187144]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-23 11:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found