[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

need for macros (was Re: Icon)




la@iki.fi writes: 

  Note that there is no need for any syntax transformations, this is pure
  Haskell. You can get surprisingly far without macros when just about
  everything is a first-class value...

That's not true. There are three reasons for introducing a syntactic
abstraction (macro) rather than a function:

 1. new binding forms
 2. implicit quoting or, more generally, a data sub-language
 3. an order of evaluation that is incompatible with evaluation 

A lazy language makes macros fro 3 unnecessary. A function with first-class
functions still needs macros for 1; otherwise you keep writing 
  foo (fn x => ...)
all over the place. 

-- Matthias