The worst Phobos template (in binderoo)

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Sat Oct 1 12:54:13 PDT 2016


On Saturday, 1 October 2016 at 15:06:44 UTC, Stefan Koch wrote:
> On Saturday, 1 October 2016 at 10:19:21 UTC, Dicebot wrote:
>> On 09/29/2016 07:02 PM, David Nadlinger wrote:
>>> [...]
>>
>> What are the issues with fullyQualifiedName in that context? I 
>> mean other than Voldemort types of course. I'd expect `static 
>> import` + `fullyQualifiedName` combo to be reasonably reliable 
>> and used it a lot in the past. Do you refer to aliases with 
>> changed protection attributes?
>
> The problem is the default template parameter Flag!"unsafe",
> because fqn makes it into "cast(Flag)".
> Getting this right is a bit tricky.

Isn't it a problem with library implementation though, one that 
would be easy to fix if FQN is to become a compiler built-in?

Reason why I'd like to have something akin to FQN for code 
generation is because it allow to generate (and save to file) 
non-templated methods directly importing required symbols (only 
generator function has to be templated). This can be of great 
importance if you consider classes and virtual methods.


More information about the Digitalmars-d mailing list