Why are you using `std.traits.fullyQualifiedName`?

Adam D Ruppe destructionator at gmail.com
Wed Jan 25 02:03:13 UTC 2023


On Tuesday, 24 January 2023 at 03:57:49 UTC, Nicholas Wilson 
wrote:
> I use a hacked down version for symbol disambiguation in mixins.

Yes, and your code is better off without it, as I've demonstrated 
in particular, as code refactored to use local names has fewer 
(and simpler) lines of code since it no longer requires the 
import hacks, compiles significantly faster since it no longer 
requires the calls to format(), and would be easier to extend to 
other uses (not super relevant since it is for internal use only 
in your project, but if that were to change, you'd hit even more 
trouble with your current approach that are all solved by the 
local alias approach).

This is my biggest objection to enshrining this particular 
function in the compiler: it encourages suboptimal code, when the 
language already has better alternatives!

My second objection is that it is under-specified, so even if you 
did want to use it, you'd technically be relying on unspecified 
behavior.


More information about the Digitalmars-d mailing list