Potential abuse of .stringof

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Tue Jun 9 17:50:53 PDT 2015


On 6/9/15 5:09 PM, Mike wrote:
> I smell an action item here.  What can be done to make this less of
> "There's no other way to do it" and more "That's how it should be done"?

An effective solution is to specify .stringof to return types that are 
valid D types (i.e. can be pasted in D code and aliased to identifiers). 
Exceptions: Voldemort types and function types.

Andrei


More information about the Digitalmars-d mailing list