Go 1.5

Chris via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Tue Sep 22 02:01:06 PDT 2015


On Tuesday, 22 September 2015 at 03:59:31 UTC, Ola Fosheim 
Grostad wrote:
> On Tuesday, 22 September 2015 at 02:15:51 UTC, jmh530 wrote:
>> Interesting. Not to resurrect the older D vs. Rust thread, but 
>> I have heard it that it can be painful to do some things in 
>> Rust. D often has the ability to do unsafe things, like 
>> disable the GC. I was looking at how Rust has raw pointers and 
>> smart pointers. I'm curious as to what it is missing that is 
>> making things more difficult for people. If you or anyone has 
>> any idea.
>
> My knowledge of Rust is only cursory, but if you want to graphs 
> (like a doubly linked list) you have to use a different pointer 
> type. Just like in c++ where you have to use shared_ptr (+ 
> weak_ptr or raw pointers) and not unique_ptr. You sometimes 
> also have to explicitly state relationships between lifetimes 
> (that one object outlives another).

But that's very annoying to work with and more pain than gain.

In my initial post I was thinking of a runtime solution where the 
object knows it's own life cycle, or at least knows when its own 
death is nigh and destroys itself. I don't know if this is 
possible at all, I simply borrowed this idea from biology. We 
don't have GC in our bodies, cells know when it's time for them 
to go.


More information about the Digitalmars-d-announce mailing list