Jonathan M Davis:

Regardless, I fully support how out works.

Why? Do you often need to return .init from out arguments? Do you think that adding logic to make sure you have initialized the argument inside the function (as in Ada and C#) isn't going to improve the safety of your D code? Do you think that both Ada and C# designers have done a design mistake? What's good in an argument annotation that is used to return a value and that accepts you to not set such value, to return a default one?


I just think that we should try and optimize out its costs

This whole discussion was not about optimizations. It was about safety and logic neatness of a language feature.

Bye,
bearophile

Reply via email to