Re: How to get only the field name from an alias?

2023-02-20 Thread Elfstone via Digitalmars-d-learn
On Tuesday, 21 February 2023 at 03:13:38 UTC, ryuukk_ wrote: I'm not sure what the solution is for your specific question, but there is some alternative way you could do: (no longer need function on your struct) [...] This is super neat, but the order of the fields will have to be frozen,

Re: How to get only the field name from an alias?

2023-02-20 Thread ryuukk_ via Digitalmars-d-learn
I'm not sure what the solution is for your specific question, but there is some alternative way you could do: (no longer need function on your struct) I tried to comment the lines, even thought i'm not sure i remember everything correctly, but it compiles :p More info:

How to get only the field name from an alias?

2023-02-20 Thread Elfstone via Digitalmars-d-learn
I'm experimenting on a serializer design. The idea includes a shorthand for processing a field and its attributes with an alias. But I'm not sure whether I can gather enough information from it, such as the name of the field. apparently F.stringof stands for "this.\" in this context. So how

Re: Non-ugly ways to implement a 'static' class or namespace?

2023-02-20 Thread FeepingCreature via Digitalmars-d-learn
On Monday, 20 February 2023 at 07:11:49 UTC, Mike Parker wrote: On Monday, 20 February 2023 at 06:26:34 UTC, FeepingCreature wrote: There have now been three pages produced by three people all agreeing with each other. At what point does it start being spam? Yes, it's all just noise

Re: Lazy and GC Allocations

2023-02-20 Thread Etienne via Digitalmars-d-learn
On Monday, 20 February 2023 at 19:58:32 UTC, Steven Schveighoffer wrote: On 2/20/23 1:50 PM, Etienne wrote: On Monday, 20 February 2023 at 02:50:20 UTC, Steven Schveighoffer wrote: See Adam's bug report: https://issues.dlang.org/show_bug.cgi?id=23627 So, according to this bug report, the

Re: Dub is not finding the dynamic link library MSVCR120.dll...

2023-02-20 Thread WhatMeworry via Digitalmars-d-learn
On Monday, 20 February 2023 at 01:04:25 UTC, Mike Parker wrote: Any error about a missing DLL is a run-time error that's unrelated to dub or the compiler. Normally, for end users, a missing MSVC runtime DLL means you have to install the MSVC Redistributable package. This version of the DLL

Re: Lazy and GC Allocations

2023-02-20 Thread Steven Schveighoffer via Digitalmars-d-learn
On 2/20/23 1:50 PM, Etienne wrote: On Monday, 20 February 2023 at 02:50:20 UTC, Steven Schveighoffer wrote: See Adam's bug report: https://issues.dlang.org/show_bug.cgi?id=23627 So, according to this bug report, the implementation is allocating a closure on the GC even though the spec says

Re: Lazy and GC Allocations

2023-02-20 Thread Etienne via Digitalmars-d-learn
On Monday, 20 February 2023 at 02:50:20 UTC, Steven Schveighoffer wrote: See Adam's bug report: https://issues.dlang.org/show_bug.cgi?id=23627 -Steve So, according to this bug report, the implementation is allocating a closure on the GC even though the spec says it shouldn't? I've been