Closed arrdem closed 8 years ago
Before:
After:
I also took the opportunity to implement some better (but still not spec-equivalent) error message in the defprotocol
implementation.
The downside here is that this is a very breaking change with regards to existing library tooling. While it codegens and runs just fine, the Jaunt test suite is now hosed because tools.namespace
isn't valid anymore.
So after thinking about this for a while - while it's nice that individual protocol methods now get leading docstring? attr-map?
same as everything else it's also a huge breaking change. Either the parser should be non-positional (which technically the original parser was) or docstring? attr-map?
should be trailing arguments after arglists so that this remains an additive change.
Opting for trailing - (method-name arglists* docstring? attr-map?)
.
Same vein as #146, the more syntax a user has to remember the more awkward it is. I didn't realize for instance that protocol methods could be variadic, or that protocols could have docstrings attached. If they can have docstrings, why don't they have metadata same as other
def
forms?Why is the parsing all done inline in one ungodly block?
Shavin' yaks....