Greatfuzzybyte wrote:I guess they just managed to updated it before you lookedLetharion wrote:Obsolete? Wasn't 1.0 just released? I don't know very much about D, but it looks very up to date to me.



Code: Select all
D_VER="0.23"Code: Select all
ebuild /usr/portage/sys-devel/gcc-4.1.1-r3.ebuild digestCode: Select all
USE="d" emerge gcc
I currently have GCC-4.1.2 installed with GDC 0.23 and haven't noticed any issues. The problem may have come from using GDC 0.22.steveL wrote:I noticed that there was an issue with the latest version of gcc. Any idea when that'll be sorted?
Yay. GDC's in portage.http://bugs.gentoo.org/show_bug.cgi?id=159196 wrote:should be in gcc-4.1.2 and gcc-3.4.6 now, cheers

Tango is linked statically as well - your best bet is to post something to the digitalmars mailing lists.aengus wrote:Right now I'm playing with gdc and I've noticed that D standard library, phobos is always linked statically. Is there any reason for it?
Code: Select all
layman -a d
When I evaluated D some time ago, I too found it very interesting.Genone wrote:I find the D language from http://www.digitalmars.com/d/ very interesting, although I haven't used it much yet.
Code: Select all
class FILE { ... };
auto FILE fok;
FILE fbroken;

D has scope classes to do RAII.Guenther Brunthaler wrote: * Even though D propagates RAII, it actually fails supporting it itself in a way that makes sense.
The last problem is due to D's destructors.
In order to implement RAII for real-world objects like a "file object" which automatically closes the file it controls as soon as the lifetime of the object ends, one needs synchronous destructors.
That is, destructors are required which are not invoked at some time, such as when the garbage collector considers it a good idea, but at a known instant, such as when the object variable representing the file goes out of scope.

This must be something new then!didl wrote:D has scope classes to do RAII.
Code: Select all
class file {
file() {
puts("Opening file");
}
~file() {
puts("Closing file");
}
};
public main() {
puts("Before opening the file.")
{
auto file f;
}
puts("After closing the file.")
}
Code: Select all
import std.stdio;
scope class file
{
this()
{
writefln("Opening file");
}
~this()
{
puts("Closing file");
}
}
int main()
{
writefln("Before opening the file.");
{
scope file f = new file;
//int[] test;
//test[2] = 5; // destructor for file is called even
// if scope is exited via a thrown exception
}
writefln("After closing the file.");
return 0;
}

Yes! Exactly like that!didl wrote:I guess you'd do something like [...] (see the commented code).

When checking http://www.digitalmars.com/d/class.html for that new "scope"-class feature in more detail, I unfortunately had to learn that only half of my critique on D's synchronous destructors has been rendered obsolete by the new D 2.0 design.didl wrote:Code: Select all
... { scope file f = new file; ...
In other words, even the most high-sophisticated multi-threaded web-server written in D must be expected to take a nap at any time - and all threads running will have to take a nap, too. Great - that was exactly what multi-threading was made for.All threads other than the garbage collector thread must be halted while the collection is in progress.
Such interruptions of normal service might be tolerable in many situations, but not in all.The time it takes for a collection to run is not bounded. While in practice it is very quick, this cannot be guaranteed.
If you do that, could you please give us feedback in this thread when a discussion is taking place?didl wrote:I'd really like to encourage you
to summarize your points as concisely as possible and post them to the D forum.

Good idea - done!didl wrote:I'd really like to encourage you
to summarize your points as concisely as possible and post them to the D forum.
