Comment by WalterBright
4 hours ago
Build times are quite a bit faster.
The package system is called dub.
Memory management options include:
1. stack allocation
2. malloc allocation
3. write your own allocator
4. static allocation
5. garbage collection
You can use exceptions or returns for error handling.
The biggest memory safety feature it has is length-delimited arrays. No more array overflows! The cost of it is the same as in std::vector when you do the bounds checked option. D also uses refs, relegating pointers to unusual uses. I don't know what you mean by "participating in optimizations".
(a) C doesn't have the hack that C++ has regarding the tag names. D has auto.
(b) D has much faster compile times than C++.
(c) The practical benefit is the language is much easier to master.
No comments yet
Contribute on Hacker News ↗