2 ms·
> Why would network programming (I/O, persistence, etc) look any different whether the language was C, Java, GoLang or other? Because different languages provi
by masklinn 6y ago
> Why would network programming (I/O, persistence, etc) look any different whether the language was C, Java, GoLang or other?
Because different languages provide different abstractive tooling and can thus yield different solutions?
> Plenty of noob code ignores errors. I sort of thought we all decided that was suboptimal. Java's response was checked exceptions.
And it was a bad one. Which is OK, everybody makes mistakes. That doesn't change the fact that Java's checked exceptions are bad.
> The only argument I've ever heard that made any sense is the silliness of catching exceptions so far removed from the root cause that your code can't do anything about it.
Made any sense with respect to what? Checked exceptions? They're bad because their classification is often incorrect (exceptions are checked which should not have been, mainly IOException) and Java provides no abstractive capabilities over them so you can't build tooling around them or intermediate layers which are not aware of the specific checked exceptions without losing that specificity (you can't be polymorphic over checked exception), they're either extremely leaky or completely erased, and things have gotten worse as Java integrated more functional features which have run head-first into these issues.
Plus they're inconvenient, because managing exceptions in Java is as verbose as everything else and by definition checked exceptions requires more management than unchecked.
> It now occurs to me that the checked exception abolitionists are advocating Happy Path Programming.
That's certainly not correct. Checked exceptions "abolitionists" just consider Java's checked exceptions to be bad.
- hota_mazi 6y ago> That doesn't change the fact that Java's checked exceptions are bad You keep saying that but without justifying it. Let's start from the beginning: what is bad exactly, and why: - Checked exceptions in general - Java's implementation of checked exceptions - Or the way some Java API's use checked exceptions ?
- masklinn 6y ago> what is bad exactly The phrase you quoted says exactly what. > and why The next paragraph I wrote explains why.