libera/#commonlisp - IRC Chatlog
Search
7:44:23
beach
Almost. If by some secret way you could obtain a reference to an invisible restart, you could invoke it.
7:47:48
jackdaniel
do you have any plausible interpretation except for the "test associated with the restart"?
7:48:27
beach
The test being referred to seems to involve the association between a restart and a condition, and that has nothing to do with the test-function.
7:49:02
jackdaniel
the test function accepts one argument, that is the condition (see the initarg :test)
7:52:36
jackdaniel
that was my initial impression, but you've hinted something above, that "visible" means only that the test function returns T
7:52:46
beach
But it is not true that COMPUTE-RESTARTS returns all applicable restarts. A restart has to be active as well in order to be returned.
7:53:51
jackdaniel
the glossary entry says: "applicable restart n. 1. (for a condition) an active handler for which the associated test returns true when given the condition as an argument. 2. (for no particular condition) an active handler for which the associated test returns true when given nil as an argument. "
8:19:39
beach
One quirk though. If we take the "associated test" in the glossary entry for "applicable restart" to mean the TEST-FUNCTION, then it implies that we can call the test function with NIL and it should then return true.
8:20:24
beach
I think it is safest to assume that we can not call the test function with NIL, and if we have "no particular condition" we should not call the test function at all.
8:36:09
jackdaniel
that's not very conservative though, I'd rather fix the description of ":test" to explicitly allow nil
10:17:44
beach
I fear that someone who reads the dictionary entry for RESTART-BIND or RESTART-CASE might create a TEST-FUNCTION that does not work if passed NIL as an argument.
14:17:01
beach
What standard special forms or macros have a list of "bindings" other than LET, LET*, HANDLER-BIND, and RESTART-BIND?
14:18:35
beach
I mean syntactically, so that some part of the form can be identified as such a list of bindings.
14:22:44
ogamita
Also, binding is something that is established at run-time, so I wouldn't make such a difference between progv and let…
14:23:20
beach
For context, I am working on Iconoclast, which is a library defining ASTs for standard special forms and macros, and I am trying to identify reasonable mixin classes. That's why I am interested only in operators where the list of bindings is syntactically apparent.
14:25:34
bike
the format of the bindings is different for a lot of these, though. like LET is symbol | (symbol [value]), which is not what handler-bind or flet have.
14:38:29
beach
The idea is to extract certain features to mixin classes to avoid code duplication. Like bindings, declarations, documentation, body, clauses, ...