D Language Foundation Monthly Meeting Summary for December 2022
Paul Backus
snarwin at gmail.com
Sat Jan 28 22:15:14 UTC 2023
On Saturday, 28 January 2023 at 13:04:33 UTC, 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?
>
> 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.
Given that the only thing `@property` actually does is change the
result of `typeof` in certain situations, the behavior changes
will probably be things like the following:
```d
static if (typeof(foo.bar) == T) {
// foo has a `T bar` property
} else {
// doesn't have it
}
```
Currently, if `foo` has a `@property T bar();`, this code will
take the first branch. If `@property` is removed, it will take
the second.
More information about the Digitalmars-d-announce
mailing list