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

David Feuer David_Feuer@brown.edu
Wed, 13 Feb 2002 8:24:22 -0500


> From: Joe <joe@culturematic.net>
> 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.