What's left to do for a stable D2?
Simen kjaeraas
simen.kjaras at gmail.com
Sun Jan 24 07:00:53 PST 2010
On Sun, 24 Jan 2010 15:12:47 +0100, grauzone <none at example.net> wrote:
> Eldar Insafutdinov wrote:
>> grauzone Wrote:
>>
>>> Eldar Insafutdinov wrote:
>>>> Andrei Alexandrescu Wrote:
>>>>
>>>>> Eldar Insafutdinov wrote:
>>>>>> Jesse Phillips Wrote:
>>>>>>
>>>>>>> Jason House wrote:
>>>>>>>
>>>>>>>> Andrei's finishing his last TDPL chapter, Sean is updating
>>>>>>>> std.thread(?), and Walter's been fixing forward reference and
>>>>>>>> CTFE bugs. What's left?
>>>>>>> This page[1] has been getting regular updates, so it should do a
>>>>>>> good
>>>>>>> job answering the question.
>>>>>>>
>>>>>>> 1.
>>>>>>> http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel#FutureDirections
>>>>>> From this list: default struct constructors?
>>>>> Walter doesn't want. This will go down as one of the larger language
>>>>> incapabilities.
>>>>>
>>>>> Andrei
>>>> Sigh...
>>> Why can't you just use opCall?
>> It's ugly, doesn't work sometimes and is inconsistent with other
>> constructors.
>
> Why doesn't it work, bugs?
> Use opCall instead of constructor in the other cases too?
> Are there cases where ctors can do something opCall can't? I thought
> constructors were only added for symmetry with dtors.
Take this for example:
struct S {
int n;
this( ) {
n = random( );
}
}
class C {
S s;
}
In C++, 'new C( );' would call S's constructor, and initialize n to
some random number. opCall can do the same thing, but must be
explicitly called in C's constructor. This can be unacceptable for
libraries, at least.
--
Simen
More information about the Digitalmars-d
mailing list