Conversation
204da61 to
7f2d80d
Compare
| "derivedMembers", | ||
| "isSame", | ||
| "compiles", | ||
| "parameters", |
There was a problem hiding this comment.
AFAICT is parameters not documented nor implemented. Is this a relict?
|
This looks very nice. I think we should merge it regardless on future directions. @WalterBright ? |
|
@wilzbach mind the odd errors in testers |
7f2d80d to
d1d457d
Compare
Thanks. |
|
|
||
| extern (C++) __gshared StringTable traitsStringTable; | ||
|
|
||
| /** |
There was a problem hiding this comment.
Made one more pass, a thought: this exposes a bunch of nicely-named symbols. Can we make them private and still generate the documentation?
There was a problem hiding this comment.
I don't think so (without bug hacks/work), but DMD != Phobos, so having public symbols shouldn't a big problem. Currently the only users are GCC + LDC and they can't use this without C++ interfaces. Also we are stuck with these traits nearly forever, so I doubt that worrying about the deprecation of a public symbol is a worry here. Deprecating a trait from the language is a different pair of shoes though.
d1d457d to
21e2175
Compare
|
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#6877" |
21e2175 to
dfb5cd9
Compare
5650e06 to
b128315
Compare
|
this would be really nice for example in DCD where there is a list of traits for autocompletion currently hardcoded in. It would make sense having this in a few places where D code generation is done at CTFE for example as you could go over |
b128315 to
007e732
Compare
|
Rebased to include the new |
c9a5a63 to
4c4592d
Compare
|
(rebaseD again). Another ping on this. |
andralex
left a comment
There was a problem hiding this comment.
Yes, apologies for the slowness. I think a good next step is to hook this in and eliminate the now redundant docs on dlang.org. Thanks!
| false | ||
| ) | ||
| */ | ||
| enum isArithmetic = "isArithmetic"; |
There was a problem hiding this comment.
I suggest using __traits(identifier, isArithmetic) to get the string. Instead of having to repeat all the enum names twice.
There was a problem hiding this comment.
Isn't that what .stringof is for? I see no problem really with the repetition, as the intent is clear.
There was a problem hiding this comment.
.stringof will result in a forward reference error.
|
I've been finding it convenient to merely put a link in the code to the spec. |
4c4592d to
e0d1d9c
Compare
|
It would have been nice to automatically generate the list of traits, but I have bigger fish to fry for now. |
This is a proof of concept following from dlang/dlang.org#1683 and the idea is to generate the spec based on the ddoc comments.