Minimizing "reserved" words
ketmar via Digitalmars-d
digitalmars-d at puremagic.com
Mon Oct 31 17:39:54 PDT 2016
On Monday, 31 October 2016 at 20:45:56 UTC, Jacob Carlborg wrote:
> In the latest release of DMD (2.072.0) TypeInfo.init has been
> deprecate in favor of TypeInfo.initializer. That would not have
> been needed if .init wasn't a built-in property but instead a
> compiler recognized function.
at least for ".init" i can't see any reason for not replacing it
with ".default". we can deprecate ".init", yet allow both for
some time, and ".default" is just as logical as ".init", but it
is using already reserved word. it is completely unambiguous, and
easy to detect in highlighting engine by checking if we have dot
before it.
at least this is way more logical than using `enum a = 42;` to
declare a single constant instead of enumeration. ;-)
More information about the Digitalmars-d
mailing list