On 2011-11-10 09:50, Jonathan M Davis wrote:
On Thursday, November 10, 2011 08:27:53 Jacob Carlborg wrote:
What is the actual Phobos guideline in naming things that are keywords
in D. I'm thinking about Method.del, shouldn't it be Method.delete_ or
something similar, don't know what the guidelines say in this case. BTW,
I would really like to have more official guidelines somewhere at the
dpl page.
Thus far, we've taken the approach of tacking an underscore on the end (so
delete would be delete_), but we haven't made any kind of official decision on
it. However, if it's reasonable to use a different word entirely, then that's
generally better. It's stuff like std.traits.FunctionAttribute which pretty
much _has_ to match the keyword where we've appended the underscore (e.g.
pure_ and nothrow_).
- Jonathan M Davis
I agree, but this case it's not a completely different word, it's a
shorting of the word.
I just like that there should be something more official when these
things pop up.
--
/Jacob Carlborg