On Tuesday, 13 October 2015 at 21:17:43 UTC, Jacob wrote:
It's only cliche if you aren't interested in the truth. It doesn't matter if I used Hilter or any other person that was "passionate" but wrong.

You are right, but Andrei and Walter often go into "passionate but wrong" mode too... It's a curse of D and probably will keep it from reaching a mature state. DIP25 is no exception.

In language design it is better to have a small set of features in the core language that are easy to reason about as a whole. D has many simple features, but the combinatorial explosion is quite high.

For instance, how is DIP25 going to work with coroutines that yield? So you transfer a refererence by "return ref", then what you call yields and the object is destructed. When the coroutine is later resumed the object no longer exists, so you have a memory unsafe situation. So then you have to add the requirement that "return ref" functions cannot call anything that yields... After some time you realize that it is possible to pass in a lambda that can destroy the object. Then you forbid passing in lambdas...

What one should have realized is that if reasoning about correctness isn't obvious then you need proofs. There is no obvious memory safety in D and there are no proofs.

Meaning, you would be better off using a general static analyzer because you get more flexibility and the same level of memory safety.

Reply via email to