syntax...(strings/interpolation/here docs)

D. Tweed
Wed, 13 Feb 2002 14:00:07 +0000 (GMT)

On Wed, 13 Feb 2002, David Feuer wrote:

> > It would be a *signifigant* boon to those
> > of us trying to get haskell into organizations
> > by using it as "maintainable perl/sh", and
> Haskell is not a "maintainable perl/sh".  It is not a good 
> language for simple shell scripts, and is not good for 
> string processing either.  Have you tried Scsh?  Or 
> Python?  I don't think that supporting string hacking is a 
> major goal for Haskell.

It does rather depend on what you're doing with perl -- if you're using it
very much as a skeleton for firing off lots of other programs or doing
stuff that relies on a high-level of ability with the filesystem (e.g.,
recursing over directory trees) then I don't think any of the existing
systems are good for this, and I doubt they would ever be as useful as
perl. But if you're doing something more like prototyping an algorithm
which is mildly complicated then the kind of things that make Perl/Python
nice (e.g., freedom from the excessive typing needed by C etc has vanished
(albeit for different reasons), garbage collection, higher order
functions) start to apply to Haskell. To make this concrete I have two
programs which were initially written in Perl for speed (one of them is
the makefile generator that crops up in all my bug reports :-) ) which got
confusing and tortured enough in Perl that I moved them to Haskell. I
think the two big disadvantages wrt Perl are (1) the comparative scarcity
and paucity of libraries (particularly one which ran under Haskell 98 and
gave you the equivalent of a Perl hash would be very useful) and (2) the
way Perl is constructed to keep going in the face of problems like
undefined variables, etc, which would crash a Haskell script. For proper,
thoroughly debugged and tested programs (2) doesn't really matter but I
can see it's useful for mod_perl scripts in Apache (say).

___cheers,_dave_________________________________________________________|`...heat generated by its microprocessors will|slope upward exponentially, reaching the power
work tel:(0117) 954-5250 |density of a nuclear reactor before 2010'-Intel