ZootAllures91
Re:My Vision of D’s Future
on Tuesday October 15, 2019 @11:32PM (#21266816)
Yeah, that works too. I was trying not to get too crazy I guess. And also just show all the various levels of "static".
Re:My Vision of D’s Future
on Tuesday October 15, 2019 @07:44PM (#21265385)
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 static if (Op == "/")
return l / r;
}
}
static immutable auto result = Math!("+").eval(1, 2) + Math!("*").eval(3.0, 3.0);
void main() {
writeln(result);
}
You'll never be able to do anything like that in Rust until const generics are not only complete on their own, but also fully compatible with "const fn".
Re:The most featureful high-level Vulkan lib by far is written in... O...
on Friday September 06, 2019 @11:10AM (#20896314)
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.
Re:Show HN: Don't code your UI, draw it
on Tuesday November 20, 2018 @05:10PM (#18498316)
None of the issues you're describing really still exist now in the majority of those kinds of tools, though.
Keep in mind it was usually always the case you could set widget sizes (or do anything else you wanted) "in code", also.
It's not as though you were ever forced to always use the visual designer for absolutely everything.
In general, there are no significant differences whatsoever between the way something like React actually works and the way something like WinForms works.