Re:Zig's Comptime Is Bonkers Good
by norir on Tuesday January 07, 2025 @10:57AM
(#42623758)
Fair point about parametricity. A language could in the macro expansion do the equivalent of a scala implicit lookup for a sorting function for the type and return an error at macro expansion time if it can't find one. That avoids the doing the right thing requires discipline problem but I agree it is still less clear from the type signature alone what the type requirements are.
[ Parent
| on HN ]
There are no comments on this comment yet.