3 ms·
Other languages don't necessarily need 'real macro systems' Lisp does, not just because it is so hopelessly low-level (for FP), but also because once you're us
by blasdel 18y ago
Other languages don't necessarily need 'real macro systems'
Lisp does, not just because it is so hopelessly low-level (for FP), but also because once you're using s-exprs it's hard to restrain anyone from mogrifying functions.
In a suitable language like Haskell where all functions are composed, using functional composition for everything instead of low-level fiddling with "statements as data" makes a shit-ton of sense. In Haskell you can also use supercompilation to resolve as much of the graph as possible at run time. No need for macros.
Don't think that other language communities want the warts from your language, just because you are so enthusiastic about them.
- brlewis 18y agoTo be honest I wasn't thinking of Haskell when I mentioned "other languages". Haskell has less need for macros for the reasons you mentioned. Lazy evaluation also makes macros unnecessary for creating your own conditionals. For eager-evaluation languages, or languages without such concise syntax for functional composition, macros fill a real need.
- rkts 18y agoHow would you do this in Haskell? http://news.ycombinator.com/item?id=222189 http://news.ycombinator.com/item?id=222189
- dlweinreb 18y agoBy the way (this is a serious question), what software products have been produced that were written in Haskell?
- silentbicycle 18y agoBesides the Glasgow Haskell Compiler (which probably doesn't count, for your purposes, but it's a good example of a large and complex program), the best example is probably Darcs (http://darcs.net/ http://darcs.net/), a distributed version control system with a powerful patch composition system. There are further answers from the Haskell wiki here: http://haskell.org/haskellwiki/Haskell_in_practice http://haskell.org/haskellwiki/Haskell_in_practice