-
Notifications
You must be signed in to change notification settings - Fork 7
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
An extended &key
arglist in the function's definition could help autodoc
#2
Comments
Thanks! Totally make sense and helps when i need to lookup which attributes are available for this tag. working on it. |
@joaotavora After i trying to add all keyword args here: https://github.com/ailisp/flute/tree/add-attr-for-auto-doc
Even number of children works, I can just use this |
Er, use a macro. :) What exactly are the advantages of functions here again? |
@joaotavora Hi, in short if these html elements were macros, they'll 1. have no knowledge of their type of arguments. 2. Write define new elements become write defmacros. 3. I'm planned to compile it to javascript to create single page application. You and other great lisp programmers may have solutions to these, but to solve all of them may be not worth the time to simply have element as functions. Advantages in long example:
by checking type of first element at run time. In the second case, Macro This outside-in property of macros also making composite elements not very friendly, it makes all user defined elements to write like
If everything is macro:
And after nested a few level of small user defined element to a high level one, it becomes mentally impossible for me (and probably, more error prone for you?) to think of these macros. Even in this small example i need to think should i use
|
flute/src/flute.lisp
Line 133 in 3138f7f
Without ever having tried your library, which looks very good, I wonder if this macro could get (from the HTML5 spec) the keyword parameters most commonly required/optional for each element and code them as
&key
args. You would still&allow-other-keys
and you could immediately ignore these args, but the big advantage is that you get to see this in the autodoc hint in SLY/SLIME.This is something I wish other libraries had. Since yours is so new and clean, perhaps you could add it. I hope I am explaining myself.
The text was updated successfully, but these errors were encountered: