[Issue 8161] give an error for invalid property functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jun 6 17:30:05 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=8161

--- Comment #10 from Jonathan M Davis <issues.dlang at jmdavisProg.com> ---
-property was dropped precisely because it was decided to not enforce
@property, and the future of @property is very uncertain. The odds are very
high that when Walter and Andrei finally get around to deciding what to do with
@property that they will simply decide to deprecate it and remove it from the
language. It makes no sense to add any kind of enforcement to something that's
almost certainly going to be removed from the language. The fact that @property
is even still used like it is is a combination of folks using it as
documentation about what they intend to be used as a property and the fact that
many folks mistakingly think that @property indicates which functions can be
used as a property. Enforcing anything about @property at this point risks
breaking existing code for something that we're probably not even keeping.

If we're going to do anything with @property, it needs to be sorted out in a
DIP that then gets official approval from Walter and Andrei. With a good enough
argument, maybe they could be convinced to add some sort of enforcement to
@property that doesn't affect non- at property functions, but without that, you're
talking about potentially breaking code over something that's probably not even
going to be staying in the language. That breakage could easily be worth it if
we decide that @property is actually going to mean something, but the odds are
much higher that it will be removed from the language than that it will be made
to mean something useful.

--


More information about the Digitalmars-d-bugs mailing list