digitalmars.D.bugs - [Issue 2052] New: Allow initialization of every kind of member variable in place of its declaration
- d-bugmail puremagic.com (34/34) Apr 28 2008 http://d.puremagic.com/issues/show_bug.cgi?id=2052
http://d.puremagic.com/issues/show_bug.cgi?id=2052 Summary: Allow initialization of every kind of member variable in place of its declaration Product: D Version: 2.014 Platform: PC OS/Version: All Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: aarti interia.pl Current behavior leads to very unclean code. You have to write: 1a. class A {} class B { static A a; this() { a = new A; } } or static this() { B.a = new A; } instead of just: 1b. class B { static A a = new A; } in every case. Request is for classes, structs and global variables. --
Apr 28 2008