+ 12
Is Java the only language that has Checked Exceptions?
I'm not asking about the definition of checked and unchecked exceptions, so please don't post a link to such a source. I'm just asking if you know a language other than Java which checks for the handling of exceptions by the programmer at compile time.
9 Respostas
+ 8
Schindlabua,Vigil deletes source code at run time? That's the first time I've heard of that!
+ 8
That's OK ⚡Prometheus ⚡ . And congratulations on halfway to level 18!
+ 7
https://www.sololearn.com/discuss/1208853/?ref=app
Not for you Sonic, I had to put this here in case anyone seeing this question does not get what you mean.
+ 5
Sonic Yeah it's a joke language but I thought it was pretty funny. :D
+ 3
Nice question! I'm not aware of any others. Checked Exceptions are pretty unpopular even among Java folk, so if there aren't any now, there probably won't be in the future.
In C++ there is `noexcept` which does some compile time checks to make sure a function does not throw an exception, I guess that's similar but also opposite.
And then theres languages without proper exceptions but that's also not really the same. Haskell typically communicates error with the `Either` and `Maybe` types which pass through the typechecker like everything else. (There is Control.Exception but I digress).
And for fun I'll mention Vigil, which will delete your source code when it finds an unhandled exception, to punish you. All runtime though and not really checked at all. I guess you have a compile-time contract with the runtime to be vigilant.
+ 2
Yes, the concept of checked exceptions as such does only exist in Java.
+ 2
@Sonic: yes, Vigil is a very "safe" esoteric programming language that does try to not allow unhandled exceptions ;-)
https://github.com/munificent/vigil
+ 1
In Python programming exception handling is like a fun and joyable 😀