On Saturday, 2 December 2023 at 15:48:02 UTC, Nick Treleaven
wrote:
On Saturday, 2 December 2023 at 15:03:25 UTC, ryuukk_ wrote:
I wish we could use ``version`` as expression, to void the
repetition:
```D
import std.stdio;
enum HasTest = version (Test) ? true : false;
Tomek Sowiński wrote t
On Saturday, 2 December 2023 at 15:03:25 UTC, ryuukk_ wrote:
I wish we could use ``version`` as expression, to void the
repetition:
```D
import std.stdio;
enum HasTest = version (Test) ? true : false;
Tomek Sowiński wrote this template:
```d
enum bool isVersion(string ver) = !is(typeof({
On Saturday, 2 December 2023 at 13:16:26 UTC, Johannes
Miesenhardt wrote:
Hello,
I am trying to learn D and I have stumbled upon an issue
Consider this code:
```d
import std.stdio;
//version = Test;
int main() {
version (Test) {
writeln("Hello, world!");
}
On Saturday, 2 December 2023 at 13:16:26 UTC, Johannes
Miesenhardt wrote:
Hello,
[...]
I see the way why it doesn't work, but I think it should.
Considering that
`version (Test) {} else {`
works without any issue but looks very ugly.
Can somebody explain if this is an intended decision or wh
Hello,
I am trying to learn D and I have stumbled upon an issue
Consider this code:
```d
import std.stdio;
//version = Test;
int main() {
version (Test) {
writeln("Hello, world!");
}
return 0;
}
```
This compiles, however what if we want to turn the versi