3 ms·
Thanks god c# doesn't have checked exceptions, they are just an enormous pain, especially when heavily using actions and functions, and most of the time they ar
by tigershark 10y ago
Thanks god c# doesn't have checked exceptions, they are just an enormous pain, especially when heavily using actions and functions, and most of the time they are completely ignored, rendering them completely useless.
The option type in Java is extremely verbose and doesn't guarantee that you won't have null pointers.
In c# you can use the null conditional operator and the coalesce operator that at least are much less verbose and more elegant.
The best solution is obviously to use a functional language like f# where you can't have null pointers.
- lacampbell 10y ago> The best solution is obviously to use a functional language like f# where you can't have null pointers. You absolutely can: Microsoft (R) F# Interactive version 14.0.23413.0 Copyright (c) Microsoft Corporation. All Rights Reserved. For help type #help;; > let s:string = null ;; val s : string = null
- tigershark 10y agoString is a .net type, f# types cannot reference null unless you explicitly add some attribute if I recall correctly.