在 Wed, 01 Apr 2009 22:59:41 +0800,Trass3r 写道:
Walter Bright schrieb:
Instead, you can do this:
class inherit : base
{
ctor(int i) { }
ctor() { super(); }
}
Yeah, don't unnecessarily bloat the language. D2 already has a freaking
huge amount of features.
?
This is a not *feature*
Walter Bright schrieb:
Instead, you can do this:
class inherit : base
{
ctor(int i) { }
ctor() { super(); }
}
Yeah, don't unnecessarily bloat the language. D2 already has a freaking
huge amount of features.
在 Wed, 01 Apr 2009 20:04:09 +0800,Christian Kamm
写道:
davidl Wrote:
Yeah, all the merits of ctor just outweigh its demerits. The only
demerit
of it is taking "ctor" to join the keyword list, However it also bans
people from using ctor as a var( it might be positive! )
If you make ctor a k
davidl Wrote:
> Yeah, all the merits of ctor just outweigh its demerits. The only demerit
> of it is taking "ctor" to join the keyword list, However it also bans
> people from using ctor as a var( it might be positive! )
If you make ctor a keyword that doesn't behave like an identifier almost
在 Wed, 01 Apr 2009 18:36:56 +0800,Christian Kamm
写道:
Walter Bright Wrote:
Instead, you can do this:
class inherit : base
{
ctor(int i) { }
ctor() { super(); }
}
Yes, but it gets uncomfortable when you want to forward more
constructors:
class base {
ctor(int never, MyTempla
Walter Bright Wrote:
> Instead, you can do this:
>
> class inherit : base
> {
> ctor(int i) { }
> ctor() { super(); }
> }
Yes, but it gets uncomfortable when you want to forward more constructors:
class base {
ctor(int never, MyTemplate!(float, 3, "abcd") ending, char[] parameter =
Instead, you can do this:
class inherit : base
{
ctor(int i) { }
ctor() { super(); }
}
class v
{
this()
{}
}
This "this" conflicts with the concept of "alias this" in D2.0
class base
{
ctor()
{
}
}
class inherit:base
{
alias base.ctor ctor; // bring up the ctor to overload, iirc, there
were people who called for this feature
ctor(int i)
{
}
}
s