5 ms·
It's really cool to see Racket being used like this! Its power really shines through: > Due to the way Hackett is implemented, many things that are language fe
by acobster 8y ago
It's really cool to see Racket being used like this! Its power really shines through:
> Due to the way Hackett is implemented, many things that are language features in Haskell can be derived concepts in Hackett. In fact, Hackett’s ADTs are not primitives, they are actually implemented as a library via the data and case macros
- bjoli 8y agoYeah. I have always been amazed by the Haskell crowd's dislike of macros. Proper macro systems are incredibly useful, even in a language like Haskell.
- jeremyjh 8y agoI don’t think Haskellers are against macros in general, but prefer Generic or GADT for tasks other languages might use macros for. Also Template Haskell sucks but we still have to use it sometimes which makes us bitter. I would welcome a hygenic, typed macro system like Hackett has.
- archgoon 8y agoWhat are the problems with Template Haskell?
- jeremyjh 8y agoAs an author of Template Haskell the expression trees you build are not constrained by types (other than Exp); you won't see a type error due to a problem in a Template Haskell function until you try to use that function in another module, and it produces Haskell code that in turn does not compile. As a user of Template Haskell functions you will mostly complain about the slow compilation time, the jarring syntax, poor documentation (since so much of Haskell documentation relies on types) and the error messages when you do something wrong.
- sridca 8y agoAlso Template Haskell is not supported by all Haskell implementations (eg: Reflex on mobile).
- bjoli 8y agoI have found the sentiment to be more "we don't need macros, we have a proper type system/laziness/whatever". I know enough Haskell to know that many of the macros I would use in scheme aren't necessary, but it is not like the good parts of compile time code generation are completely negated.