News for hackers. Stuff that matters.
Re:Exploring the C# 6 Null Propagation Operator by EvenThisAcronym on Sunday April 19, 2015 @04:21PM (#9404708)
The null coalescing operator is nice, but it can be overused. I recently saw some Swift code that was riddled with question marks everywhere, which()?.made?.the?.code?()?.very?.difficult?.to?().read.
Re:Exploring the C# 6 Null Propagation Operator by WorldWideWayne on Sunday April 19, 2015 @06:31PM (#9405150)
I wonder if it would be useful to have some kind of block scope for null coalescing? (Alternatively, why can't the programmer just specify the root coalesce and have the compiler figure out the rest?)

Beyond that, I imagine the solution is to just bake null coalescing into the language somehow. Then maybe you'd want to have a block scope for non-null coalescing code.