www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: What's left to do for a stable D2?

reply Eldar Insafutdinov <e.insafutdinov gmail.com> writes:
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?
Jan 23 2010
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
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? 

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
Jan 23 2010
next sibling parent reply Eldar Insafutdinov <e.insafutdinov gmail.com> writes:
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? 

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...
Jan 23 2010
parent reply grauzone <none example.net> writes:
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? 

job answering the question. 1. http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel#FutureDirections

From this list: default struct constructors?

incapabilities. Andrei

Sigh...

Why can't you just use opCall?
Jan 23 2010
parent reply Eldar Insafutdinov <e.insafutdinov gmail.com> writes:
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? 

job answering the question. 1. http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel#FutureDirections

From this list: default struct constructors?

incapabilities. Andrei

Sigh...

Why can't you just use opCall?

It's ugly, doesn't work sometimes and is inconsistent with other constructors.
Jan 24 2010
parent reply grauzone <none example.net> writes:
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? 

job answering the question. 1. http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel#FutureDirections


incapabilities. Andrei



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.
Jan 24 2010
parent grauzone <none example.net> writes:
Simen kjaeraas wrote:
 On Sun, 24 Jan 2010 15:12:47 +0100, grauzone <none 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?

good job answering the question. 1. http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel#FutureDirections


language incapabilities. Andrei



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.

Yes, but ctors with empty argument list aren't coming to D anyway.
Jan 24 2010
prev sibling next sibling parent reply "Simen kjaeraas" <simen.kjaras gmail.com> writes:
On Sat, 23 Jan 2010 18:51:19 +0100, Andrei Alexandrescu  
<SeeWebsiteForEmail erdani.org> 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?

job answering the question. 1. http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel#FutureDirections


Walter doesn't want. This will go down as one of the larger language incapabilities. Andrei

Might I inquire as to the reasoning for this? Having no default struct constructors means one has to use classes if such a capability is needed. Or of course, call an extra function! :p -- Simen
Jan 23 2010
parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Simen kjaeraas wrote:
 On Sat, 23 Jan 2010 18:51:19 +0100, Andrei Alexandrescu 
 <SeeWebsiteForEmail erdani.org> 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?

job answering the question. 1. http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel#FutureDirections


Walter doesn't want. This will go down as one of the larger language incapabilities. Andrei

Might I inquire as to the reasoning for this? Having no default struct constructors means one has to use classes if such a capability is needed. Or of course, call an extra function! :p

I wish the fix were as simple as that. Andrei
Jan 23 2010
prev sibling next sibling parent reply Don <nospam nospam.com> writes:
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? 

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

What's the reason? Does he dislike the concept, or feel it's a implementation disaster, or something else?
Jan 24 2010
parent reply Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Don 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? 

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

What's the reason? Does he dislike the concept, or feel it's a implementation disaster, or something else?

There are concerns about implementation difficulty and also about muddying other parts of the language, e.g. T.init may fail. Andrei
Jan 24 2010
next sibling parent Don <nospam nospam.com> writes:
Andrei Alexandrescu wrote:
 Don 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? 

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

What's the reason? Does he dislike the concept, or feel it's a implementation disaster, or something else?

There are concerns about implementation difficulty and also about muddying other parts of the language, e.g. T.init may fail.

Good to know. I think not having struct default constructors muddies some other things, though. For example, I don't see the point of struct invariants if it's possible to create a struct which doesn't obey the invariant. I think the semantics of T.init are a bit doubtful already. Consider that floats default init to NaN, and char.init is not a valid UTF character. I don't think the existing T.init is trouble-free.
Jan 24 2010
prev sibling next sibling parent Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> writes:
Denis Koroskin wrote:
 I strongly believe D should get rid of T.init; I hope I'll find some 
 time to write a proposal and a rationale for it.

Interesting. I suggest you hurry - now is the time! Andrei
Jan 24 2010
prev sibling parent reply dsimcha <dsimcha yahoo.com> writes:
== Quote from Denis Koroskin (2korden gmail.com)'s article
 On Sun, 24 Jan 2010 11:38:50 +0300, Andrei Alexandrescu
 <SeeWebsiteForEmail erdani.org> wrote:
 Don 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?

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

implementation disaster, or something else?

There are concerns about implementation difficulty and also about muddying other parts of the language, e.g. T.init may fail. Andrei

to write a proposal and a rationale for it.

Are you suggesting that we just get different syntax for it, or is the suggestion deeper? I don't think there's any chance of us getting rid of default initializers this late in the game, and I think it's absolutely essential for generic code that there be an easy way to get the default initializer for a type.
Jan 24 2010
parent Rainer Deyke <rainerd eldwood.com> writes:
dsimcha wrote:
 Are you suggesting that we just get different syntax for it, or is the
suggestion
 deeper?  I don't think there's any chance of us getting rid of default
 initializers this late in the game, and I think it's absolutely essential for
 generic code that there be an easy way to get the default initializer for a
type.

T init(T)() { T v; return v; } The nice thing about the above is that it also works when T has a default constructor. -- Rainer Deyke - rainerd eldwood.com
Jan 25 2010
prev sibling next sibling parent "Simen kjaeraas" <simen.kjaras gmail.com> writes:
On Sun, 24 Jan 2010 15:12:47 +0100, grauzone <none 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?

good job answering the question. 1. http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel#FutureDirections


incapabilities. Andrei



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
Jan 24 2010
prev sibling next sibling parent "Simen kjaeraas" <simen.kjaras gmail.com> writes:
grauzone <none example.net> wrote:

 Yes, but ctors with empty argument list aren't coming to D anyway.

Yeah. That was kinda the point. We wants them, though. -- Simen
Jan 24 2010
prev sibling parent "Denis Koroskin" <2korden gmail.com> writes:
On Sun, 24 Jan 2010 11:38:50 +0300, Andrei Alexandrescu  
<SeeWebsiteForEmail erdani.org> wrote:

 Don 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?

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

implementation disaster, or something else?

There are concerns about implementation difficulty and also about muddying other parts of the language, e.g. T.init may fail. Andrei

I strongly believe D should get rid of T.init; I hope I'll find some time to write a proposal and a rationale for it.
Jan 24 2010