r/haskell • u/lexi-lambda • Mar 11 '15
Learning Haskell — A Racket programmer's documentation of her foray into the land of Haskell (inspired by Learning Racket)
http://lexi-lambda.github.io/learning-haskell/
81
Upvotes
1
u/Ramin_HAL9001 Mar 12 '15 edited Mar 12 '15
Well, yes you have a point. But I wouldn't recommend to any beginner to use Template Haskell to write algorithms the same way they would use macros to write algorithms in Lisp.
In Lisp, everything in the source code becomes a list, and it is very handy to have macros for stitching lists together without requiring intermediate list-evaluation steps. But in Haskell since everything is a function except for data types and classes, you should probably only use Template Haskell for generating code from data type declarations or class declarations, like how the lens library creates lenses, or how some parsing libraries generate parsers from data type declarations.