Stroustrup's slides about c++11 and c++14

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 17 09:12:27 PDT 2014


On Sunday, 14 September 2014 at 22:58:44 UTC, David Nadlinger 
wrote:
> On Sunday, 14 September 2014 at 07:35:12 UTC, Daniel Murphy 
> wrote:
>> I do acknowledge this is a problem, but I am yet to run into 
>> it in actual D code.  Most of my static ifs are either inside 
>> templates, inside functions, or are being used to bypass 
>> version's limitations.
>
> I tend to run into forward referencing issues all the time 
> "declarative" metaprogramming, i.e. when generating some code 
> based on existing symbols and their attributes (e.g. 
> serialization, RPC, …). Manu IIRC also has some related war 
> stories to tell.
>
> Granted, it's not the directly the same as two ifs next to each 
> other conflicting (you mostly get dependencies via 
> __traits(allMembers, …) and so on), but whatever forward 
> reference resolution mechanism we choose must be able to handle 
> both the same.
>
> David

Yes, this is not uncommon way to hit the wall. Separating 
reflection/generation "stages" into different modules and keeping 
an eye for cyclic imports seems like a best way to address it 
right now in my opinion.


More information about the Digitalmars-d mailing list