[LUNI] Linux Programming
Martin Maney
maney at pobox.com
Fri Mar 8 10:29:01 CST 2002
Ah, spring. It's my favorite time of the year - a time of renewal, of
throwing out the detritus of the winter past, and for at least one good rant
against illogic...
On Fri, Mar 08, 2002 at 09:37:36AM -0600, Steven Lembark wrote:
> Main point w/ Perl is that the programmer has the option
> of doing things how they feel is best. If you don't want
Main problem w/ Perl is that the programmer has the option of disguising
what he means with needlessly different ways of saying it. This whole
notion that code should be as ad-hoc structured as natral language seems to
me to reflect a deep misunderstanding about what is the hard part of
programming. OTOH, it's a very postmodern idea. You know what you get when
you cross a Mafia Don with a postmodernist, don't you? That's right, an
offer you can't understand.
> programmers to have control over the code why not just use
> automatic code generation and be done with it?
Coding is not the hard part. You may want to review essentially all the
work done in the last couple decades on programming methodology if you're
unclear about this.
> These are a few reasons I find it easier to teach Perl
> as a first language: Most of the coding effort goes
Just want to draw attention to your statement that you're talking about
teaching a *first* [programming] language here.
> towards productive work rather than syntatic sugar.
> Learning Java as a first language faces much the same
> problem. Compare the amount of code it takes to just
> 'print "Hello, world!\n";'. I also don't have to spend
Wow, that's a lot of overhead. Here's the Python version:
'Hello, world!'
Obviously the overhead of trivial programs is more important than anything
else - we should never have given up Basic!
> The other nice thing about Perl on *NIX is that you get
> much of the C std library and unistd.h built into the
> language (e.g., link, unlink, symlink, directory and
> file tests). Intuitions based on C or shell operations
> translate directly into Perl code. This makes it easier
> to actually write code that does something useful early
> in the learning cycle (e.g., scan a directory for files
What a strange and irrational thing to say. People who are learning their
*first* programming language already understand the C library routines?
Pull the other one, Steven, this one's got bells on!
> containing "Hello, world!"). Combined with the portability
> to windog & Mac platforms this allows people to walk up
> and deal with realistic problems quickly.
Portability is another straw man - if serious portability is important, you
code in C, probably with some annoying omissions if you want to cover the
more esoteric platforms that still have non-standard-compliant toolchains.
Anywhere you can run Perl, there is a C compiler available: that's how Perl
got there, after all.
--
I must say I find television very educational.
The minute somebody turns it on,
I go to the library and read a good book. -- Groucho Marx
(sometimes I think we should s/television/internet/ ...)
More information about the luni
mailing list