|
|
|
|
|
by vorg
4500 days ago
|
|
The ?. has only really worked in scripting, i.e. writing quick scripts to manipulate code written in a proper type-checked programming language. Groovy has it but Java doesn't. In Groovy's heyday if some code spewed out NullPointerException, the first thing people did was replace all the . with ?. and run it again, because the code was throwable quality anyway. I can't imagine anything good will come of putting ?. into C# (or Java) which is meant for building more lasting systems. |
|
This pattern comes up fairly often in Haskell, which accomplishes it with the Maybe monad.