-
Notifications
You must be signed in to change notification settings - Fork 70
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
Minification breaks protocols #171
Comments
Another option would be to implement multimethods and use that instead. |
For what it's worth I had something along those lines https://github.com/Gozala/protocol, however I thought that instroducing dependency was not ideal because wisp tried really hard to not introduce any external dependencies. Another approach to address minifier issue could be to use identifier as opposed to name directly, meaning protocol method could be added field e.g. |
…Incidentally, a working multimethods implementation can be found in my |
Nice! |
Protocols rely on function names, which get shortened by code minifiers. Moreover, they (at least within one protocol definition) tend do be replaced by the same identifier, so in runtime an implementation of a minified protocol will only have one method (the one defined latest).
Possible fixes:
name
property externally withObject.defineProperty()
:The text was updated successfully, but these errors were encountered: