6 ms·
D and Rust are on the opposite sides at dealing with memory safety. Rust ensures safety by constantly making you think about memory with its highly sophisticate
by arcadia_leak 7mo ago
D and Rust are on the opposite sides at dealing with memory safety. Rust ensures safety by constantly making you think about memory with its highly sophisticated compile-time checks. D, on the other hand, offers you to either employ a GC and forget about (almost) all memory-safety concerns or a block scoped opt-out with cowboy-style manual memory management.
D retains object-oriented programming but also allows functional programming, while Rust seems to be specifically designed for functional programming and does not allow OOP in the conventional sense.
I've been working with D for a couple of months now and I noticed that it's almost a no-brainer to port C/C++ code to D because it mostly builds on the same semantics. With Rust, porting a piece of code may often require rethinking the whole thing from scratch.
- nurettin 7mo ago> block scoped opt-out with cowboy-style manual memory management Is this a Walter Bright alt? I've seen him use the cowboy programmer term a few times on the forum before.
- arcadia_leak 7mo agoYeah, I just saw his posts too and picked up the term :)
- keybored 7mo agoIt makes sense for someone who has read about D to pick up on Bright phrasing.
- tmtvl 7mo agoThe term 'Cowboy coder' has been around for some time. Everybody's favourite unreliable source of knowledge has issues dating back to 2011: <https://en.wikipedia.org/wiki/Cowboy_coding https://en.wikipedia.org/wiki/Cowboy_coding>
- pjmlp 7mo agoThis was already a thing in Usenet days, an example from 1998 https://groups.google.com/g/comp.lang.lisp/c/tfzX3Sq96Xk/m/0opsc5Q8NfwJ https://groups.google.com/g/comp.lang.lisp/c/tfzX3Sq96Xk/m/0...