Make dur a property?

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Jan 23 09:45:49 PST 2013


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?)

Compiling with -property also makes *compile-time* unary functions look
ridiculous:

	int ctfeFunc(int arg)() { return dotDotDotMagic(arg); }
	void main() {
		//int x = ctfeFunc!(123);	// doesn't work with -property!
		int x = ctfeFunc!(123)();	// looks ridiculous
	}


T

-- 
They say that "guns don't kill people, people kill people." Well I think
the gun helps. If you just stood there and yelled BANG, I don't think
you'd kill too many people. -- Eddie Izzard, Dressed to Kill


More information about the Digitalmars-d mailing list