Arrow notation, etc.

Keith Wansbrough
Fri, 12 Oct 2001 13:02:07 +0100

> Very good.  Is there a concrete proposal for such macros?  I think the
> arrow notation would be a harder test case than any of the existing
> syntactic sugar; I'd be curious to see what it looked like.  (And is
> there support for adding these macros to Haskell?)

Sadly, there's not a concrete proposal - it seems that no one sees a 
need for macros in a lazy language.  Most of what they do can be 
achieved through laziness - you can write "if" in Haskell already, for 
example, whereas you need a macro for it in Lisp.  Your arrow notation 
example may provide some motivation, though.

> > Hygiene is a key concept here; that variables bound in a macro
> > should not clash with other variables in the program (unless this is
> > explicitly required).
> Off to read some Dylan manuals,

Do that, but the details of hygienic macros were first worked out in 
Scheme (a kind of Lisp), and then Dylan's was based on Scheme's.  The 
key difference is that Dylan has a rich syntax, whereas Scheme just has 

> 	Dylan