Re:Juice – Oberon JIT browser plugin (1996)
by pjmlp on Friday February 02, 2024 @12:03PM
(#39231127)
Every time I have to track down exceptions in production on .NET projects, I deeply miss checked exceptions, because some people just code away without caring one second to check their errors.
Re:Juice – Oberon JIT browser plugin (1996)
by cmrdporcupine on Friday February 02, 2024 @12:08PM
(#39231184)
When I worked in Java (11+ years ago) the style dogma was to never use checked exceptions.
Re:Juice – Oberon JIT browser plugin (1996)
by pjmlp on Friday February 02, 2024 @12:51PM
(#39231768)
That won't fly in code review in most Java shops I worked on.
Also the way modern languages that are worshiped for forcing to handle return values, with pattern matching, try and ? operators, it is nothing other than proving the point checked exceptions matter, even if they come with a different flavour.
Re:Juice – Oberon JIT browser plugin (1996)
by cmrdporcupine on Friday February 02, 2024 @12:54PM
(#39231809)
Good to hear. I used to get scolded for using checked exceptions.
But it was the 2010s.
These days I work in languages with better static guarantees. Always wanted that back then, but felt like a minority.
Re:Juice – Oberon JIT browser plugin (1996)
by pjmlp on Friday February 02, 2024 @12:57PM
(#39231855)
I have been doing Java projects since 2006, and as mentioned on my edit you might have missed when replying, pattern matching, try and ? are just another way to package checked exceptions in a different coating.
Re:Juice – Oberon JIT browser plugin (1996)
by cmrdporcupine on Friday February 02, 2024 @01:00PM
(#39231902)
Yes and no. There's a non-local-control aspect to exceptions that's a bit different from explicit return or ? in that it's explicit in the text of the program rather than in the signature of the method. But yes, the compiler will stop you in either case, so that's fine.
But there's no guarantee that someone under you didn't go and pull out a RuntimeException on you.
The potential was there, but in reality people just used Flash, and when the DOM/JavaScript interface became more competent, they switched to using JS.
And, yeah, as others pointed out... Java did not have generics, or enums until 1.4, and its exception mechanism hasn't really stood the test of time.