On Saturday, 24 December 2016 at 11:21:11 UTC, Stefan Koch wrote:
On Saturday, 24 December 2016 at 00:55:01 UTC, Yuxuan Shui
wrote:
What's the correct way?
You cannot initialize an AA at compile-time.
Because AA's are provided by druntime and the ABI is not stable.
For fun I'm throwing toge
On Saturday, 24 December 2016 at 11:21:11 UTC, Stefan Koch wrote:
You cannot initialize an AA at compile-time.
Because AA's are provided by druntime and the ABI is not stable.
This bit me when I was first starting out as well. I feel like
there's really very little documentation on this, and
On 12/24/2016 08:36 AM, aliak wrote:
"Cannot apply `()' to a value of type `Command!(__lambda1, int)". I
think it's failing when it checks for "!isFunctionPointer!A &&
!isDelegate!A".
Storing delegates is a workaround. Three notes in the code:
// (1) Added imports
import std.variant;
import s
On Saturday, 24 December 2016 at 19:58:45 UTC, Jake Pittis wrote:
I'm posting this in Learn because I'm assuming I've done
something wrong rather than discovered a bug.
You need to pass all modules you use to the linker somehow.
Easiest is to `dmd main.d linking_succeeds.d linking_fails.d`
ju
I'm posting this in Learn because I'm assuming I've done
something wrong rather than discovered a bug.
Running `dmd -main main.d` with the following 3 files produces
the following linker error.
```
$ dmd -main main.d
Undefined symbols for architecture x86_64:
"_D13linking_fails12__ModuleInf
Hey, so I'm trying to make an variant array of objects (each one
has an opCall defined) and then call each of them in succession.
It doesn't seem to be working. The error I get is:
"Cannot apply `()' to a value of type `Command!(__lambda1, int)".
I think it's failing when it checks for "!isFun
On Saturday, 24 December 2016 at 12:42:31 UTC, Andrew Edwards
wrote:
The authors of "The Art of Java" present, as a first coding
example, a recursive-descent parser to demonstrate Java's
ability to facilitate low level programming commonly performed
in C and C++.
I took the opportunity to por
The authors of "The Art of Java" present, as a first coding
example, a recursive-descent parser to demonstrate Java's ability
to facilitate low level programming commonly performed in C and
C++.
I took the opportunity to port the code to D. By doing this, I
now have an understanding of how a
On Saturday, 24 December 2016 at 00:55:01 UTC, Yuxuan Shui wrote:
I tried this:
immutable int[char] xx = ['Q':0, 'B':1, 'N':2, 'R':3,
'P':4];
And got a "non-constant expression" error (with or without
'immutable').
What's the correct way?
You cannot initialize an AA at compile-time.