A deep dive into advanced metaprogramming in the JAI programming language, where developer 'valigo' walks through a custom implementation of an 'or_return' macro — similar to error-propagation patterns in languages like Go and Swift. The implementation uses JAI's compile-time message handling, modify directives, string templates, and code injection to automatically insert return statements with typed default values. The discussion covers JAI's macro system, compile-time type checking, backtick returns for escaping macro scope, and how JAI's fast compilation (sub-second) compares favorably to C++. Also touches on JAI's philosophy as a personal, opinionated language with rich how-to documentation.
•48m watch time
Sort: