On Friday, 20 October 2017 at 09:40:26 UTC, Satoshi wrote:
If you need reason why is writing less code better just calculate the time of it.
getOne(foo, null)  // costs 3 sec.
foo ?? null // cost 1 sec.


Note that I do NOT object to these additions. I think they'd be trivial, backward compatible, and familiar to C# and even some Javascript coders. We could probably patch the compiler in under an hour to support them since they are such simple constructs and if you did that, I'd vote yes to merge them.


But at the same time, be realistic. The time difference is actually insignificant, and the function is even more flexible (it can do things like type conversions too) and I'd choose a function over the sugar in many cases.

We shouldn't be arguing about this, we should either be implementing it or just using the easily-written function.

Reply via email to