Our great sponsors
-
coalton
Coalton is an efficient, statically typed functional programming language that supercharges Common Lisp.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
aith
[Early Stages] Low level functional programming language with linear types, first class inline functions, levity polymorphism and regions.
Extremely difficult, but you can do some cool stuff with macros if you do it. Have a look at Alexis King's "Hackett" language for a cool example: https://lexi-lambda.github.io/hackett/
See also https://github.com/coalton-lang/coalton which takes a slightly different approach.
It depends on how powerful you want your macros to be. In aith, my macros are just a compile time lambda calculus. My macros can only generate values or other macros, this limits them to being no more powerful then what you can normally do with functions but it (will when my language is usable) let me write code that I know will be inlined and edsls that compile into fast code. With these limitations I can completely type check macros ahead of time (because they are just like funcitons) and I can also use my kind system to prevent macro types from leaking out into normal ones.
You could look at how https://github.com/paulstansifer/unseemly/ does it
Once the RakuAST project is completed, and the ongoing implementation work in the Raku directory of the rakuast branch of Rakudo is merged (maybe this year, but I suspect next year), the scheme will aiui be something like:
You might be interested in Klister: https://github.com/gelisam/klister