|
Archives
D Programming
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.ide
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger
D.gnu
D
C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows
digitalmars.empire
digitalmars.DMDScript
electronics
|
digitalmars.D - Re: What's left to do for a stable D2?
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?
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
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...
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?
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.
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.
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.
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
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
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?
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
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.
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
== 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.
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
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
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
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.
|
|