DIP64: Attribute Cleanup

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 21 23:23:52 PDT 2014


On Sat, 21 Jun 2014 22:07:22 -0700
Jonathan M Davis via Digitalmars-d <digitalmars-d at puremagic.com> wrote:

> On Sat, 21 Jun 2014 20:48:40 +0000
> Brian Schott via Digitalmars-d <digitalmars-d at puremagic.com> wrote:
>
> > Why is D being consistent with other languages a more important
> > goal than D being consistent with D?
>
> It's not, but there _is_ a cost to making it less consistent with
> other languages, especially when it's _currently_ consistent with
> them. And it's definitely not worth becoming inconsistent with other
> languages IMHO if you're not actually fixing the inconsistencies in D
> at the same time. We either need to make attributes _completely_
> consistent, or there's no point in changing any of them. And that
> would mean either putting @ on the front of _all_ of them or _none_
> of them, not simply adding @ to a few of them.

And actually, the more that I think about this, the less that I like the idea.
It's bad enough that we have @safe, @property, etc., but having to put @ on
all of the attributes? I don't want to have @public, @static, @final etc. It's
just ugly and more verbose.

I'd much rather just put up with having to explain to people that we didn't
want to add new keywords and that that's why @safe, @trusted, @system,
@property, and @nogc have @ on them and nothing else does - i.e. it's pretty
much purely a question of age. Sure, the inconsitency sucks, but I think that
it would suck more to have to have @ everywhere. I wouldn't mind having @safe
and company changed to keywords to make the attributes consistent, but I very
much doubt that that would be acceptable at this point.

- Jonathan M Davis


More information about the Digitalmars-d mailing list