Closed Ambrevar closed 1 year ago
Yes, I'm all for keywords :D
New version is okay too!
Good idea.
So I suggest we first release 1.1.0 as per #13 (@aadcg will do it I think), then we can release 2.0.0.
Actually I remember why I went with symbols: it's because I initially thoughts that restarts had to be non-keyword symbols. But that's not true, since this works:
(restart-case
(let ((r (find-restart :my-restart)))
(format t "~S is named ~S" r (restart-name r)))
(:my-restart () nil))
So really no reason to keep these non-keyword symbols.
As an alternative perspective, maybe we can add functions that mirror/invoke the given restart? The standard even has some functions like that (continue
, abort
). So we can retain those symbols and bind those to functions like that:
(defun ask (&optional condition)
(invoke-restart (find-restart 'ask condition)))
I like it!
For instance in
We export unbound symbols
ask
,reload
andoverwrite
. This is not very good practice. Switching to keywords would be cleaner.The only benefit of using symbols is that they allow for completion, but since they are not in a separate package anyways, it's unlikely that completion is ever going to be used.
Unfortunately this breaks backward compatibility. I suggest to release 2.0 then, since a new version is long due.
@aadcg @aartaka ?