Thread overview | |||||
---|---|---|---|---|---|
|
December 29, 2012 identifier full name | ||||
---|---|---|---|---|
| ||||
Attachments:
| Does anyone know how does one obtain the full name of an identifier (e.g. mypackage.mymodule.myfunction versus just myfunction) at compile time?
--
Bye,
Gor Gyolchanyan.
|
December 29, 2012 Re: identifier full name | ||||
---|---|---|---|---|
| ||||
Posted in reply to Gor Gyolchanyan | Am 29.12.2012 10:54, schrieb Gor Gyolchanyan: > Does anyone know how does one obtain the full name of an identifier (e.g. mypackage.mymodule.myfunction versus just myfunction) at compile time? > > -- > Bye, > Gor Gyolchanyan. http://dlang.org/phobos/std_traits.html#fullyQualifiedName ought to work, but it suffers from some bugs and may fail in some cases. There is also this pull request that makes it usable for general types as opposed to only user defined symbols: https://github.com/D-Programming-Language/phobos/pull/863 |
December 29, 2012 Re: identifier full name | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sönke Ludwig Attachments:
| Thanks! I didn't know about that. On Sat, Dec 29, 2012 at 2:15 PM, Sönke Ludwig <sludwig@outerproduct.org>wrote: > Am 29.12.2012 10:54, schrieb Gor Gyolchanyan: > > Does anyone know how does one obtain the full name of an identifier (e.g. mypackage.mymodule.myfunction versus just myfunction) at compile time? > > > > -- > > Bye, > > Gor Gyolchanyan. > > http://dlang.org/phobos/std_traits.html#fullyQualifiedName ought to work, > but it suffers from some > bugs and may fail in some cases. There is also this pull request that > makes it usable for general > types as opposed to only user defined symbols: > https://github.com/D-Programming-Language/phobos/pull/863 > -- Bye, Gor Gyolchanyan. |
Copyright © 1999-2021 by the D Language Foundation