Minimizing "reserved" words
Karabuta via Digitalmars-d
digitalmars-d at puremagic.com
Mon Oct 31 16:40:26 PDT 2016
On Monday, 31 October 2016 at 20:45:56 UTC, Jacob Carlborg wrote:
> The "reserved" words I'm referring to are not necessarily
> keywords in the language but otherwise words that should be
> avoided, especially for defining methods in aggregates. I'm
> mostly thinking of built-in properties like .init, .classinfo,
> .sizeof, .outer and so on.
>
> All of the above can be used as variable names. Some of the
> above names can be used as methods in aggregates but some
> cannot. Of the above names only "sizeof" cannot be used as a
> method name.
classinfo, sizeof... do not match the D coding convention (which
is necessary to write D code that don't conflict with built-in
keywords) when used. camelCase is recommended.
More information about the Digitalmars-d
mailing list