Hacker News new | ask | show | jobs
by ntrel 5079 days ago
> things that were mutable are still mutable

`string` is immutable. You can use immutable everywhere if you like. C++ doesn't even have transitive const.

> templates are still templates

With constraints, unlike C++.

> hard-to-solve threading problems are just as hard to solve

Have you looked at D 2.0? Globals are thread-local by default, unlike C++. Implicit sharing is disallowed, unless immutable.

> region pointers

It's early days (perhaps I don't fully get region/borrowed pointers yet) but D's `scope` parameter keyword seems very similar. It prevents an argument escaping the function call.

> lack of nulls

This is the big one. Unfortunately D doesn't seem to have an answer on this. I understand Rust uses option/sum types for this, which seems like a great idea.