4 ms·
> abusing the preprocessor this much shouldn't be necessary and the result is almost unreadable. The readability of error messages was always my beef with macr
by naasking 11mo ago
> abusing the preprocessor this much shouldn't be necessary and the result is almost unreadable.
The readability of error messages was always my beef with macro-based generics. Maybe 15 years ago I played around with using UTF characters for the brackets and type separators when translating a generic type into name-mangled type, so at least the generated source and error messages would still be clear and understandable.
Robust UTF support for identifiers and preprocessor was still kind of inconsistent across compilers though, so it only sort of worked. I expect this has improved considerably now though, so maybe I should try again and write something up. You can embed a surprising amount of advanced programming language theory into suitable name resolution.