Re:Facebook is using D in production starting today
by derefr on Friday October 11, 2013 @02:50PM
(#6535098)
Sounds like D would be better-compared to Rust, then.
[ Parent
| on HN ]
Re:Facebook is using D in production starting today
by pcwalton on Friday October 11, 2013 @03:28PM
(#6535352)
Rust has safe manual memory management, at the cost of a learning curve. In D you must use the garbage collector if you want memory safety, but it avoids all the complexity of lifetimes and uniqueness. This difference makes the two languages feel pretty different, even if at their core they're pretty similar.
Re:Facebook is using D in production starting today
by luikore on Saturday October 12, 2013 @02:05AM
(#6537492)
D is more like C++ without macro and with GC plus some engineering features (unit test is a language feature? weird). Rust looks different and does different. For example, idiomatic foreach block in Rust is a syntax sugar of passing lambda, which is more friendly to parallelism. While in C++/D it is a syntax sugar of classic for-loop with iterator, which is more efficient in unparalleled environment.
Re:Facebook is using D in production starting today
by dbaupp on Saturday October 12, 2013 @07:43AM
(#6538378)
> For example, idiomatic foreach block in Rust is a syntax sugar of passing lambda, which is more friendly to parallelism
This changed with the recent 0.8, `for` is now syntax sugar for using the Iterator trait, which optimises exactly like C++ (the vector iterator even vectorises when LLVM can do it).
Rust has actually moved to have iterators that are very similar to (a subset of) D's ranges.
Re:Facebook is using D in production starting today
by WalterBright on Saturday October 12, 2013 @03:28AM
(#6537691)
You might thing that unit test as a language feature is weird. But our experience with it is that minor-seeming weird feature has been an enormous success.
It has literally transformed writing D code, and for the better. There's another little feature, -cov, which will tell you which lines of code are covered by the unit tests.
It's hard to understate the improvement these engender.