Yeah, that works too. I was trying not to get too crazy I guess. And also just show all the various levels of "static".
Well, for example: import std.stdio; struct Math(string Op) { static auto eval(T, U)(T l, U r) { static if (Op == "+") return l + r; else static if (Op == "-") return l - r; else static if (Op == "*") return l * r; else…
The author of the library seems to be unusually prolific in general, if you look at what their overall lineup of public GitHub repos consists of. They're like the Pascal version of Fabrice Bellard or something.
Yeah, that works too. I was trying not to get too crazy I guess. And also just show all the various levels of "static".
Well, for example: import std.stdio; struct Math(string Op) { static auto eval(T, U)(T l, U r) { static if (Op == "+") return l + r; else static if (Op == "-") return l - r; else static if (Op == "*") return l * r; else…
The author of the library seems to be unusually prolific in general, if you look at what their overall lineup of public GitHub repos consists of. They're like the Pascal version of Fabrice Bellard or something.