4 ms·
I see that Hare exposes itself via the hare module in stdlib. Is there any plan for metaprogramming/macro (not preprocessor) in Hare?
by magnio 5y ago
I see that Hare exposes itself via the hare module in stdlib. Is there any plan for metaprogramming/macro (not preprocessor) in Hare?
- ddevault 5y agoNo, there are no plans for first-class metaprogramming. The purpose of exposing the parser, type checker, module system, etc, in the standard library is to allow for users to more easily build custom Hare tooling. The closest thing you could get to metaprogramming with this is some assistance with code generation.
- marosgrego 5y agoThat's unfortunate, some metaprogramming could be fun and without generics and such quite simple and efficient even.
- ddevault 5y agoTotally agree that metaprogramming is fun. But I don't think it's a recipe for simplicity and robust engineering, and that's the priority with Hare.
- turminal 5y ago> Is there any plan for metaprogramming/macro (not preprocessor) in Hare? We don't plan to add anything like that. Hare strives to be simple and straightforward. Metaprogramming would not fit it well. Closest thing in this direction that we tried was reflection, but that didn't turn out to play along with the rest of the language either, so it was removed.
- throw10920 5y agoCan you explain how metaprogramming is not "simple and straightforward"?