-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow customizing which exception types are show-stopping #1010
base: master
Are you sure you want to change the base?
Conversation
As I understand from the previous discussion, there is no issue. The R6RS standard doesn't specify anything about the REPL, so chibi is free to do what it wants. |
The issue affects the top level exception handler in general. E.g. R6RS code which issues a warning by raising a (The solution here is more general and allows any predicate applied to a |
These patches are a good example of my complaints against R6RS 😞 R6RS adds too many new features to the core. Exception handling has to have a prescribed condition type with compound conditions, and the top-level has to have a special exception handler for a certain type of conditions. Moreover, these are (or were at the time of writing) experimental features, unlike any existing exception systems. Is anyone really using these continuable exceptions in real-world code? I digress. And none of that is to say R6RS is bad, but rather that it doesn't attempt to build things on top of a small core. Chibi's raison d'etre is to be small (originally comparable in size to TinyScheme), and while nobody complains about the lack of R6RS support, I do get complaints about the gradual increase in size. Note Chibi does not even aspire to full R7RS large support. So if the answer to every R6RS feature is "let's just add it init-7.scm" then we have a problem, and need to go back to considering a flag to instead switch to "init-6.scm". For this particular change, I might consider a command-line flag to register an exception handler from a module (the code would be similar to the |
This is somewhat off-topic, but while I agree that some parts of the R6RS had this problem (IO, records, and enumerations in particular), this is not really true of the condition system. SRFI 34 (which gave us |
|
Back on topic, I realize there's a much simpler solution here. Just put the overload of This will conflict with other attempts to install a top-level exception handler, but not the built-in one which gives advice on errors (except that it will be unable to give advice on warnings). |
What do you think of this as a solution to the issue raised in #1008 about some condition types, when raised continuably, returning control to the program?
This isn’t wired into the
(chibi repl)
exception handler yet as I wanted to get your feedback on this approach first.