I have a problem, that .stringof doesn't return what I'm
expecting. Consider the following:
template A(string T)
{
enum A : bool
{
yes = true,
}
}
void main()
{
A!"asdf" a1;
typeof(a1) a2;
mixin(typeof(a1).stringof ~ " a3;");
}
I
On 08/17/2016 02:08 PM, Eugene Wissner wrote:
I have a problem, that .stringof doesn't return what I'm expecting.
Consider the following:
template A(string T)
{
enum A : bool
{
yes = true,
}
}
void main()
{
A!"asdf" a1;
typeof(a1) a2;
mixin(typeof(a1).stringof ~
On Wednesday, 17 August 2016 at 12:39:18 UTC, ag0aep6g wrote:
On 08/17/2016 02:08 PM, Eugene Wissner wrote:
I have a problem, that .stringof doesn't return what I'm
expecting.
Consider the following:
template A(string T)
{
enum A : bool
{
yes = true,
}
}
void main()
{
fullyQualifiedName doesn't work with BitFlags for example:
import std.stdio;
import std.typecons;
import std.traits;
enum Stuff
{
asdf
}
void main()
{
BitFlags!Stuff a;
typeof(a) b;
mixin(fullyQualifiedName!(typeof(a)) ~ " c;");
mixin(typeof(a).stringof
On 08/19/2016 02:42 PM, Eugene Wissner wrote:
fullyQualifiedName doesn't work with BitFlags for example:
I think that qualifies as a bug, because fullyQualifiedName is supposed
to be usable in code generation.
On Friday, 19 August 2016 at 15:15:55 UTC, ag0aep6g wrote:
I think that qualifies as a bug, because fullyQualifiedName is
supposed to be usable in code generation.
This is a misconception. Neither .stringof nor fullyQualifiedName
should *ever* be used in code generation. There is a myriad of
On 08/19/2016 05:36 PM, David Nadlinger wrote:
This is a misconception. Neither .stringof nor fullyQualifiedName should
*ever* be used in code generation.
The spec itself recommends fullyQualifiedName for code generation:
Note: Using .stringof for code generation is not recommended, as the in
On Friday, 19 August 2016 at 15:47:00 UTC, ag0aep6g wrote:
https://dlang.org/spec/property.html#stringof
Someone should edit that, if fullyQualifiedName is no good
either.
Indeed. I'm sure the change was well-intentioned, but symbol
visibility/import concerns and Voldemort types should make
On Friday, August 19, 2016 15:36:02 David Nadlinger via Digitalmars-d-learn
wrote:
> On Friday, 19 August 2016 at 15:15:55 UTC, ag0aep6g wrote:
> > I think that qualifies as a bug, because fullyQualifiedName is
> > supposed to be usable in code generation.
>
> This is a misconception. Neither .str
On Friday, 19 August 2016 at 18:52:02 UTC, Jonathan M Davis wrote:
Unfortunately, once you start doing stuff with things like
__traits(allMembers, ...), you're dealing with strings
You should immediately go back into symbol land by passing that
string into __traits(getMember).
I agree that s
10 matches
Mail list logo