2 ms·
I have written a lot of metaprogramming myself, like 5/10 of my repos are macro libraries. And I share your concern. Even the manual advices people to use the l
by planetis 6y ago
I have written a lot of metaprogramming myself, like 5/10 of my repos are macro libraries. And I share your concern. Even the manual advices people to use the least "powerful" tool for the job. These are proc/func<template<macro.
Macros are prefered for creating dsl like https://github.com/treeform/fidget https://github.com/treeform/fidget or https://github.com/pragmagic/karax https://github.com/pragmagic/karax
Otherwise the advice is to use them when they "pull their weight". The reason is they're a lot harder to write and even "design" them right (how they function, what code they write, etc) takes a lot of effort. And in most cases the simpler "tools" will fit your needs.