Bug 11705 – std.typecons.Typedef is missing proper documentation
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-07T07:11:00Z
Last change time
2014-04-23T15:59:40Z
Keywords
pull
Assigned to
andrej.mitrovich
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2013-12-07T07:11:34Z
This is the web page about std.typecons.Typedef:
http://dlang.org/phobos/std_typecons.html
It explains:
template Typedef(T)
struct Typedef(T, T init, string cookie = null);
Library typedef.
But it lacks an explanation of the purpose of the 'cookie' template argument.
Comment #1 by github-bugzilla — 2014-04-23T14:45:54Z
Comment #2 by bearophile_hugs — 2014-04-23T15:14:40Z
(In reply to github-bugzilla from comment #1)
> Commits pushed to master at https://github.com/D-Programming-Language/phobos
Thank you Andrej :-) What I'd like is something like the lisp gensym, so you can generate progressive numbers at compile-time to mix-in ever different internal names, and avoid the cookie hack.
Comment #3 by andrej.mitrovich — 2014-04-23T15:59:40Z
(In reply to bearophile_hugs from comment #2)
> (In reply to github-bugzilla from comment #1)
>
> > Commits pushed to master at https://github.com/D-Programming-Language/phobos
>
> Thank you Andrej :-) What I'd like is something like the lisp gensym, so you
> can generate progressive numbers at compile-time to mix-in ever different
> internal names, and avoid the cookie hack.
I've replied to your gen issue here: https://issues.dlang.org/show_bug.cgi?id=12100