version as an expression?
ryuukk_
ryuukk.dev at gmail.com
Mon Sep 12 11:20:25 UTC 2022
I remember what one person told one not long ago: "stop using
other languages as an example, just use that if that's what you
want"
I'm forced again, let's look at other languages, zig for example:
```
const socket_t = switch (builtin.os.tag) {
.windows => usize,
else => i32
};
```
caveat: it require importing "builtin", but it's very small, and
doesn't have any other inter module dependency, it's just data,
evaluated at compile time:
Will we stick to what C did 50 years ago, or we are ready to move
on and improve the language beyond what C can offer? (no, 'std'
doesn't count as improving the language)
I don't particularly like zig, but if D is stuck in the past and
we can't expect improvements, and all the solutions will be on
phobos instead, then i'll find it as dreadful to use as zig, and
at this point using zig would feel better
"Why do you hate phobos this much?"
It's not that i hate it, it serve a purpose, offer a set of API
ready to use
The problem is i target esoteric platforms that the language
doesn't want to acknowledge (WASM), so i can't use it, that's as
simple as that
And the performance profile is not aligned with what i expect, so
i can't use it because of that too
I am also against Exception Handling, so i can't use it for that
too
I want to control the memory usage, so i can't use it for that too
This is why i expect D to be usable, and to receive improvements
without having to subscribe to Phobos, wich i don't want to do,
hence my suggestions
More information about the Digitalmars-d
mailing list