You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be helpful to have two separate types for exceptions, with one type for recoverable exceptions and the other type for unrecoverable exceptions (i.e., fatal exceptions). The cleanest approach of this idea appears to be the Java class hierarchy with https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html for recoverable exceptions and https://docs.oracle.com/javase/8/docs/api/java/lang/Error.html for unrecoverable exceptions. Having that clear delineation helps to communicate the intent in the source code for potential failures.
My impression is that at least the ATS2 exceptions AssertExn and IllegalArgExn are unrecoverable because they represent a broken constraint in the source code.
If you didn't want to have exceptions in ATS3, that would be good too. That approach should be better for compiler optimizations like inlining.
The text was updated successfully, but these errors were encountered:
@Necryotiks Yes, for referential transparency, that is preferred in any programming language. This issue was focused on "if exceptions exist, how should they be" because of experiences with ATS2 exceptions. The exit C function is seen as an exn side-effect and the atexit C function registers a function pointer that is similar to a catch of an unrecoverable exception (without exit existing as an exception), so the unrecoverable exceptions concept is common/old/useful even if it doesn't use exception types.
It would be helpful to have two separate types for exceptions, with one type for recoverable exceptions and the other type for unrecoverable exceptions (i.e., fatal exceptions). The cleanest approach of this idea appears to be the Java class hierarchy with https://docs.oracle.com/javase/8/docs/api/java/lang/Exception.html for recoverable exceptions and https://docs.oracle.com/javase/8/docs/api/java/lang/Error.html for unrecoverable exceptions. Having that clear delineation helps to communicate the intent in the source code for potential failures.
My impression is that at least the ATS2 exceptions
AssertExn
andIllegalArgExn
are unrecoverable because they represent a broken constraint in the source code.If you didn't want to have exceptions in ATS3, that would be good too. That approach should be better for compiler optimizations like inlining.
The text was updated successfully, but these errors were encountered: