[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Perl vs Python vs ....



Dan Stromberg <strombrg@hydra.acs.uci.edu> writes:

> One way to do that, is to hang onto /bin/sh until something like guile
> is ready.

> Another way to do that, is to move beyond perl to something like python
> or ML (metalanguage) - right now.  It wouldn't take much at all.

Guile (or something like it) could be very good.  I use RScheme
(somewhat similar) pretty often now, but I still use perl for jobs
that require munging large numbers of files in complex regexpish ways.
I've found that if you use "-w", "use strict", and "use English", perl
makes/allows you to write pretty reasonable code.  Certainly code that
is far better (and usually faster) than sh.

I did look in to python at one point.  I actually read essentially the
entire manual (it's long).  In general I was fairly impressed, but
there were several things that (IMO) just weren't right that prevented
me from being willing/able to use it.  One of those was indention for
syntax.  In my *opinion* this is just wrong.  I did have a practical
reason, though.  It makes it quite hard to automatically generate code
in an indentation based language because you can't, for example, just
spit out the code for a loop, you have to know how deep that loop is
in the rest of the program to get the indentation right.  This is not
a problem in programs using braces or parens or whatever.  It's not
impossible to overcome the problem, just more difficult than
necessary.  There are other reasons I don't like indentation as
syntax, but that was the clincher.

If you really want to know the other reasons I didn't like python
(assuming there were any, I can't remember since I made that decision
a long time ago), I'll get the manual and try to recall; I don't think
it's really fair to say "I hated that, it was bad" without being
willing to back it up.

So I use perl now, but if Guile gets to where it can do the same kind
of text processing better, or nearly as well, with better syntax, I'll
be happy to switch.

(This thread is in great danger of turning in to another language holy
war.  I'm really not trying to add any fuel.  I hope I didn't.)

--
Rob



Reply to: