[ale] Language Jihad!

Fletch fletch at phydeaux.org
Wed Jul 11 12:25:52 EDT 2001


>>>>> "Dow" == Dow Hurst <dhurst at kennesaw.edu> writes:

[...]

    Dow> Can someone convince me which is the best all around language
    Dow> to use?  Seems that C++ isn't so difficult but I really like
    Dow> Ruby and Perl for the simplicity of how much code you have to
    Dow> write to get something done.

        Now you're really going to start something . . .  :)


        Of course, let me prefix this with the fact that I'm a perl
person (if that's not already clear :).


        I've looked at python, and while it has some neat features it
also has warts (whitespace for block structure, the lambda function
isn't, some of the scoping of variables) which turn me off from it.
I've glanced at Ruby, and it also looks interesting (I've heart it
refered to as `python with braces' :), but I haven't looked at it in
enough detail to give any real comments towards it.  I've done C and
C++ in the past, but I don't do much with them any more unless it's
interfacing perl with something like a C library (of course with the
cool Inline::C module you can just embed the C right in your perl and
go on about your business).


    Dow> Of course, I really enjoy piping basic unix commands together
    Dow> such as:

    Dow> grep -n 'chemical connectivity' inputfile |
    Dow> awk -v FS=: '{print($1)}' |
    Dow> xargs -i echo " -e '{},{} s/0X    4 /0X   11 /g' \"
    Dow> >> output_sed_script.txt


        See, this'd be a one liner with perl (just ask a python zealot
to do that from the command line; oh wait, they probably can't because
of the whitespace thing :).  But there's nothing wrong with using the
shell for one-offs; being able to chain together programs like that is
one of the benefits of the UNIX way.


        My advice would be to learn several tools, and know their
strengths and weaknesses.  I'm a perl person, but I'll use C if speed
is needed.  I'm an emacs person, but if I'm su'd to root or just
making a  two line change in a file on a remote machine I'll often
just `vi foo'.


        I'd look at perl, ruby, python, and tcl; find the one that
you `click' with; and learn it well.  Of course out of those four I'd
recommend perl, but that's just my personal bias.  With any of them,
you can pretty much handle any type of problem (the thing is how much
headache you have to put up with to do so :).  Also, if you're going
to work on *NIX boxen I'd recommend picking up at least a reading
familiarity with C or C++.

-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
770 933-0600 x211(w)  |  scary questions." -- Jules                =(___)=
                      |                                               U
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.





More information about the Ale mailing list