2 ms·
At least C# has the syntactic sugar to easily check for null references which lets you avoid the horrors of code like `(if s != null && s.length)`. Instead you
by jeromebaek 8y ago
At least C# has the syntactic sugar to easily check for null references which lets you avoid the horrors of code like `(if s != null && s.length)`. Instead you can type `s?.length`. Never have I appreciated syntactic sugar as much.
- rusk 8y agoA lot of higher languages use the concept of truthiness such that null, or 0-length both evaluate to false: if (s) then do stuff with s;