D Language Foundation Monthly Meeting Summary for December 2022
Walter Bright
newshound2 at digitalmars.com
Sat Jan 28 22:16:47 UTC 2023
On 1/28/2023 5:04 AM, Johan wrote:
> Is there a document describing cases where removal of `@property` does not lead
> to an error but does lead to a change in behavior of code?
No.
> We are considering a blanket removal of 3000+ instances of `@property`. The
> resulting compile errors I can fix (unless they happen in speculative
> instantiations, they may be harder to track down), but I am especially worried
> about changes in behavior that do not lead to compile warnings/errors.
It's been a while, but I think the only difference is if you're taking the
address of a property. Without the @property, the address of the function will
be taken. With @property, the address of the return value will be taken.
This will affect inference, such as `auto x = &s.foo;`
That will likely lead to type mismatch errors further down the line, but I can't
guarantee it.
The best approach I can recommend is to remove the @propertys a handful at a
time, checking them into git, and running your test suite to check for any
failures. This will make `git bisect` invaluable in tracking down the cause of
any errors that are missed by the test suite.
More information about the Digitalmars-d-announce
mailing list