User defined attributes use

H. S. Teoh hsteoh at quickfur.ath.cx
Mon Sep 16 12:40:42 PDT 2013


On Mon, Sep 16, 2013 at 12:28:21PM -0700, Andrei Alexandrescu wrote:
> On 9/16/13 11:56 AM, Namespace wrote:
> >I hate this NotNull struct hack. It is the same crap as the current
> >scope solution.
> 
> Scoped variables in the language were a lot worse.

One thing I'd *really* like to have is proper escape analysis and
inlining of scope delegates. I've been waiting a long time for this, and
there are no signs of implementation in sight. :-(


> >BTW: I'm curious which built-in feature will be removed
> >next, maybe AA?
> 
> If we're diligent and lucky, hopefully.

I don't see what luck has to do with it...  Currently, I lack just time
and adequate understanding of DMD internals; if I had both, I'd rip out
the AA implementation from DMD right now, and replace it with something
saner.


[...]
> >And I agree absolute, to disable default CTor's by struct's was a
> >huge mistake. But D is full of those. ;)
> 
> They are not disabled.
[...]

Huh, what?

	struct S {
		this() {}
	}
	
DMD output:

/tmp/test.d(2): Error: constructor test.S.this default constructor for structs only allowed with @disable and no body


T

-- 
You are only young once, but you can stay immature indefinitely. -- azephrahel


More information about the Digitalmars-d-learn mailing list