Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

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.



> 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.


The 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>


This was already a thing in Usenet days, an example from 1998

https://groups.google.com/g/comp.lang.lisp/c/tfzX3Sq96Xk/m/0...


Yeah, I just saw his posts too and picked up the term :)


It makes sense for someone who has read about D to pick up on Bright phrasing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: