digitalmars.D - Re: What's left to do for a stable D2?
- Eldar Insafutdinov <e.insafutdinov gmail.com> Jan 23 2010
- Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> Jan 23 2010
- Eldar Insafutdinov <e.insafutdinov gmail.com> Jan 23 2010
- grauzone <none example.net> Jan 23 2010
- Eldar Insafutdinov <e.insafutdinov gmail.com> Jan 24 2010
- grauzone <none example.net> Jan 24 2010
- grauzone <none example.net> Jan 24 2010
- "Simen kjaeraas" <simen.kjaras gmail.com> Jan 23 2010
- Don <nospam nospam.com> Jan 24 2010
- Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> Jan 24 2010
- Don <nospam nospam.com> Jan 24 2010
- Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> Jan 24 2010
- dsimcha <dsimcha yahoo.com> Jan 24 2010
- Rainer Deyke <rainerd eldwood.com> Jan 25 2010
- "Simen kjaeraas" <simen.kjaras gmail.com> Jan 24 2010
- "Simen kjaeraas" <simen.kjaras gmail.com> Jan 24 2010
- "Denis Koroskin" <2korden gmail.com> Jan 24 2010
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
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
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
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
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
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
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
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
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
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
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
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
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
== Quote from Denis Koroskin (2korden gmail.com)'s articleOn 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
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
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
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
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