On Saturday, 27 January 2018 at 08:18:07 UTC, thedeemon wrote:
On Friday, 26 January 2018 at 21:17:14 UTC, Oleksii Skidan
wrote:
struct Game {
Triangle player = new Triangle;
When you initialize a struct member like this, compiler tries
to calculate the initial value and remember it as
On Friday, 26 January 2018 at 13:25:12 UTC, Seb wrote:
On Friday, 26 January 2018 at 13:05:26 UTC, Jonathan M Davis
wrote:
If you don't think that simply using assertions for unit tests
is good enough, then I'd suggest that you look at
https://code.dlang.org/packages/unit-threaded
There's als
Hi,
I get a strange error:
```
λ dub build
Performing "debug" build using D:\d\dmd2\windows\bin\dmd.exe for
x86.
strange ~master: building configuration "application"...
source\app.d(24,18): Error: non-constant expression
&[Particle(1.0F, 1.0F, 1.0F), Particle(2.0F,
2.0F,
On Friday, 26 January 2018 at 13:05:26 UTC, Jonathan M Davis
wrote:
On Friday, January 26, 2018 12:30:03 Oleksii Skidan via
Digitalmars-d-learn wrote:
On Friday, 26 January 2018 at 11:32:42 UTC, Mike Parker wrote:
> On Friday, 26 January 2018 at 11:18:21 UTC, Oleksii Skidan
>
&
On Friday, 26 January 2018 at 13:05:26 UTC, Jonathan M Davis
wrote:
Why are you using strings for any of this? Printing out the
expression is kind of pointless. If you have the file and line
number (which an AssertError will give you), then you know
where the failure is, and you can see the exp
On Friday, 26 January 2018 at 11:32:42 UTC, Mike Parker wrote:
On Friday, 26 January 2018 at 11:18:21 UTC, Oleksii Skidan
wrote:
I could imagine a mixin-based solution in D:
```d
// Usage:
ASSERT!"a == b";
```
But it seems a bit alien to me. First of all, it kind of
stringly-typed one. Secon
Hi,
I wonder if it's possible to convert D language code into a
string at compile time? C/C++ preprocessor has this feature
built-in: `#` preprocessing operator allows converting a macro
argument into a string constant. See the following code snippet
for example:
```cplusplus
#define ASSERT