What is the state of @property?

Simen Kjærås simen.kjaras at gmail.com
Mon Aug 29 12:05:43 UTC 2022


On Monday, 29 August 2022 at 08:40:51 UTC, Andrei Alexandrescu 
wrote:
> One possibility to make it more useful would be to have 
> @property disallow function signatures that cannot possibly be 
> used as properties (e.g. multiple non-defaulted parameters).

Nitpick - this actually does work:
```
void prop(int i, float f, string s) {}


void main() {
     import std.typecons : tuple;
     import std.meta : AliasSeq;
     prop = tuple(1, 2.0, "foo").expand;
     prop = AliasSeq!(1, 2.0, "foo");
}
```

Should it, though? Probably not.

--
   Simen


More information about the Digitalmars-d mailing list