
From: Joe
Does anybody with their elbows in the code think variable interpolation and/or multi-line strings are good/doable ideas?
Can't say I have my elbows in the code, but I think that multi-line strings could be useful. I'm not sure what I think about variable interpolation... I imagine it would make the language somewhat more difficult to parse. What would this be like, anyway? Something like "foo $(bar) baz" = "foo"++bar++"baz" ? And then you'd have to have some sort of quoting rule, for dollar signs followed by parens... I guess you'd probably want some variant that automatically applies show...
Would this be the sort of change one could make without a lot of previous familiarity with the implementation of Hugs/Ghc?
You'd certainly need to be familiar with how to specify syntax, and how to write a parser.
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.
generally make an already delightful language more delightful.
This message has been brought to you by the letter alpha and the number pi.

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_________________________________________________________ www.cs.bris.ac.uk/~tweed/|`...heat generated by its microprocessors will email:tweed@cs.bris.ac.uk|slope upward exponentially, reaching the power work tel:(0117) 954-5250 |density of a nuclear reactor before 2010'-Intel
participants (2)
-
D. Tweed
-
David Feuer