A D vs. Rust example

user1234 user1234 at 12.de
Thu Oct 20 14:15:47 UTC 2022


On Thursday, 20 October 2022 at 13:37:07 UTC, Don Allen wrote:
> [...]
> This is just one of multiple examples I personally encountered 
> where Rust's approach to memory- and thread-safety makes life 
> difficult for its users. On simple cost-benefit grounds, I can 
> see using Rust for writing OS drivers (or even an entire OS) or 
> for use in embedded systems, especially if there's a real-time 
> constraint; in other words, where a GC would be unsuitable. But 
> for ordinary applications on today's hardware? Use of Rust 
> instead of D, Go, Nim, etc. makes no sense to me.

Thanks, that's very interesting.

I've remarked that the problem in the first example is that Rust 
does not seem to detect that the two closures are not escaped, 
i.e it seems it has no notion of a difference between nested 
functions and lambdas.


More information about the Digitalmars-d mailing list