On Wed, 23 Jan 2013 09:45:49 -0800 "H. S. Teoh" <[email protected]> wrote:
> On Wed, Jan 23, 2013 at 06:26:51PM +0100, Adam D. Ruppe wrote: > > On Wednesday, 23 January 2013 at 17:13:05 UTC, Timon Gehr wrote: > > >That is completely nonsensical behaviour. Just ignore -property. > > > > > > Amen! -property MUST die. @property should fix the real problems > > with properties, not leave that broken while adding new problems. > > I'm starting to think that perhaps @property should be disposed of > completely. Just unify properties with nullary functions and be done > with it. There is no semantic difference between them anyway. (Didn't > D1 used to do that?) > Unfortunately, yea, D1 did do that. One of the many things that were fixed in D2 (at least it was partially fixed anyway). Having the *caller* decide whether something is a property or not makes as much sense as having the caller decide the function's name, signature and semantics. This level of need to go doing s/()/ over everything is blown ridiculously out of proportion. Not to mention misguided. I've dealt with code that consistently took advantage of D1's misfeature of disguising function calls as no-op statements, and it absolutely is a non-feature that provides no *real* benefit outside of code obfuscation contests. Properties are for *properties*, not for hacking around a language's syntax for the sake of a highly questionable and semantically misleading aesthetic "benefit". And just because certain people are unable/unwilling to see that there *is* in fact a meaningful distinction between "property" and "function" doesn't mean it isn't actually there. > int x = ctfeFunc!(123)(); // looks ridiculous If anything, that's an issue with template syntax, it has nothing to do with properties, let alone the beloved practice of abusing properties for the sake of things that clearly are not properties.
