-
Notifications
You must be signed in to change notification settings - Fork 2
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
Inline documentation (slot-name initform "docstring") #2
Comments
Agree it's a nice thing :) I wonder if it's possible though. Take a slot that has the (malignant-slot :reader "My docstring") Kaboom! :p |
Yes, but for such cases one's better off using a regular Other than that extreme corner-case, the thing is relatively doable with e.g. pattern matching. |
Let's not introduce a library for just this, it's easy enough to check if the 3rd element is a string and the second is not a keyword. I think the following check would work: (and
(oddp (length DEFINITION))
(not (keywordp (nth 1 DEFINITION)))
(stringp (nth 2 DEFINITION)) |
Alternatively, check that the second element is not in
|
Yes, fair. |
I've been bringing this up here and there, but here's a PR.
I believe it would be an aesthetic and useful change allowing inline documentation in our custom syntax for class definitions, like
This is going to cut some lines of code for short slots and make long slots slightly easier to follow when used to.
But, obviously, it causes quite some trouble for slot parsing, which is already quite complex.
If we agree that this is something we want, I'm ready to prototype this thing with all the caution left in me :P
The text was updated successfully, but these errors were encountered: