Languages for servers (Go, D, and more)

Meta via Digitalmars-d digitalmars-d at puremagic.com
Fri Jul 4 09:16:33 PDT 2014


On Friday, 4 July 2014 at 15:29:06 UTC, Brian Rogoff wrote:
> On Friday, 4 July 2014 at 14:10:29 UTC, bearophile wrote:
>>>D: y u no distinguish between ints/longs/floats/doubles and 
>>>pointers when taking out the trash? You argue that internal 
>>>pointers make implementing a precise garbage collector (which 
>>>wouldn’t mistake numbers for pointers) impossible, but Go 
>>>managed it in spite of also having internal pointers.
>
> It is true that a precise (and moving) GC is desirable for long 
> running servers, and that the Go GC has been receiving a lot of 
> love; it's now stack precise with Go 1.3.
>
> I don't recall anyone arguing that internal pointers make a 
> precise GC impossible. But there are plenty of D features that 
> complicate a precise GC, amongst them internal pointers. IMO, 
> the D story around GC is currently one of the weaker parts of 
> the language. Sure, there are workarounds, including not using 
> the GC at all, but then so many features are tied to it that 
> the interested developer may just decide to use a language with 
> a more mature and precise GC, like Java or Go, or none at all 
> like C.

With @nogc and the -vgc compiler switch, I think it would fairly 
easy now to do C-style memory management and know that there are 
no hidden GC allocations in your program. Whether you would want 
to do this in D is another story.


More information about the Digitalmars-d mailing list