[Issue 2052] New: Allow initialization of every kind of member variable in place of its declaration
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 28 02:09:29 PDT 2008
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 at digitalmars.com
ReportedBy: aarti at 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.
--
More information about the Digitalmars-d-bugs
mailing list