I have only skimmed the conversation but I’d like to voice my strong opposition to having both \def
and \define
and having them do different things. It’s super confusing and people will keep mixing them up. if anything I think going verbose is better than adding another layer of arcane symbols that do magic things without any regard to what the symbol means in a language or culture.
I don’t have much of an opinion for using $$
for custom widget beyond not fully understanding why - I presume it’s for future-compatibility to avoid future core widgets accidentally getting overridden by custom ones? I’d wonder if a better option wouldn’t be to just use single $
and require explicit overriding, something like:
\widget $myCustomWidget()
// vs
\widget $codeblock()
// vs
\widget override codeblock()
The first one would define a custom widget, the second would do nothing and show a warning to the user of the mistake, the third would actually and intentionally override a built-in widget. Buuuuut… I am a very hands-on and technical person who likes to keep things perfectly clean and pristine. I imagine for a regular user the warning could be confusing. Than anything.
I am a little surprised with the name of the <$genesis>
widget. I don’t think it matters for non-programmers what’s the name ultimately, and for programmers <$super>
or <$parent>
would’ve been much more obvious (and both are a simpler word than genesis which might be tougher to non native English speakers who are not fluent).
I like the idea of functions and I think it’s fine to keep them named that way to avoid the confusion with filters in general, but I don’t see any mention of how they behave with input if you invoke them inside a filter, though I am going to guess they just execute the same way - once per input.
I don’t quite understand the parameterised transclusion though, the word doesn’t appear in documentation and the only difference… I reread the docs and understand it now. The fill/slot feels kinda clunky to use but I’d put the blame on this being HTML, I don’t think there’s a better way to handle it.