|
|
|
|
|
by mrkeen
127 days ago
|
|
I was recently switched from Java to C# at work. Initially I was impressed by the null detection. Then I found out about defaults. Way worse than null. C and Go can demand a bit of ceremony with manual error checks. Things get bad if you forget to do the checks. Java and Checked exceptions forced error-checking, which is a little verbose, and most of the time you can't 'handle' (for any meaning other than log) them, so you just rethrow. C# went with unchecked exceptions. But with default values, there's no need to throw! Avoid Java's messy NPE encounters by just writing the wrong value to the database. |
|