Is borrow checker the right thing for D?

Timon Gehr timon.gehr at gmx.ch
Sun Aug 18 23:45:04 UTC 2019


On 18.08.19 14:51, victoroak wrote:
> On Saturday, 17 August 2019 at 20:42:46 UTC, Timon Gehr wrote:
>>
>> I don't understand why you think I think using Rust for inspiration is 
>> a bad thing. I'm not opposed to doing what Rust does. Rust _actually 
>> does some version of what I suggested in my last post_. The problem is 
>> that it seems that very few people actively participating on this 
>> forum actually understand what it is that Rust does. (E.g., a very 
>> common misconception is that Rust unsafe is like D @system. Rust 
>> unsafe is actually like D @trusted. Another misconception is that Rust 
>> ensures that raw mutable pointers don't alias.)
>>
> 
> Rust do have unsafe functions that can only be called inside unsafe 
> blocks so it's like @system functions in D.

This is true of course. What I mean is some people think unsafe _blocks_ 
are like @system in D, even though they are Rust's version of @trusted. 
Thanks!


More information about the Digitalmars-d mailing list