www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - identifier full name

reply Gor Gyolchanyan <gor.f.gyolchanyan gmail.com> writes:
--f46d04083e431d22b704d1fac531
Content-Type: text/plain; charset=UTF-8

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.

--f46d04083e431d22b704d1fac531
Content-Type: text/html; charset=UTF-8

<div dir="ltr">Does anyone know how does one obtain the full name of an
identifier (e.g. mypackage.mymodule.myfunction versus just myfunction) at
compile time?<br clear="all"><div><br></div>-- <br>Bye,<br>Gor Gyolchanyan.
</div>

--f46d04083e431d22b704d1fac531--
Dec 29 2012
next sibling parent =?UTF-8?B?U8O2bmtlIEx1ZHdpZw==?= <sludwig outerproduct.org> writes:
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
Dec 29 2012
prev sibling parent Gor Gyolchanyan <gor.f.gyolchanyan gmail.com> writes:
--14dae9d717bc68781804d1fb8620
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Thanks! I didn't know about that.


On Sat, Dec 29, 2012 at 2:15 PM, S=C3=B6nke Ludwig <sludwig outerproduct.or=
g>wrote:

 Am 29.12.2012 10:54, schrieb Gor Gyolchanyan:
 Does anyone know how does one obtain the full name of an identifier (e.=


 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

--=20 Bye, Gor Gyolchanyan. --14dae9d717bc68781804d1fb8620 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Thanks! I didn&#39;t know about that.</div><div class=3D"g= mail_extra"><br><br><div class=3D"gmail_quote">On Sat, Dec 29, 2012 at 2:15= PM, S=C3=B6nke Ludwig <span dir=3D"ltr">&lt;<a href=3D"mailto:sludwig oute= rproduct.org" target=3D"_blank">sludwig outerproduct.org</a>&gt;</span> wro= te:<br> <blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p= x #ccc solid;padding-left:1ex">Am 29.12.2012 10:54, schrieb Gor Gyolchanyan= :<br> <div><div class=3D"h5">&gt; Does anyone know how does one obtain the full n= ame of an identifier (e.g.<br> &gt; mypackage.mymodule.myfunction versus just myfunction) at compile time?= <br> &gt;<br> &gt; --<br> &gt; Bye,<br> &gt; Gor Gyolchanyan.<br> <br> </div></div><a href=3D"http://dlang.org/phobos/std_traits.html#fullyQualifi= edName" target=3D"_blank">http://dlang.org/phobos/std_traits.html#fullyQual= ifiedName</a> ought to work, but it suffers from some<br> bugs and may fail in some cases. There is also this pull request that makes= it usable for general<br> types as opposed to only user defined symbols: <a href=3D"https://github.co= m/D-Programming-Language/phobos/pull/863" target=3D"_blank">https://github.= com/D-Programming-Language/phobos/pull/863</a><br> </blockquote></div><br><br clear=3D"all"><div><br></div>-- <br>Bye,<br>Gor = Gyolchanyan. </div> --14dae9d717bc68781804d1fb8620--
Dec 29 2012