Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mentels
Copy link

@mentels mentels commented Apr 3, 2017

This is based on the regular protocol dispatching for the Encoder protocol
and configuration-driven function clauses generation for the Decoder protocol.

This is based on the regular protocol dispatching for the Encoder protocol
and configuration-driven function clauses generation for the Decoder protocol.
@mentels mentels requested a review from arkgil April 3, 2017 10:19
Copy link
Contributor

@arkgil arkgil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good, although I see one issue with this approach. In order to extend our enc/decoder, one has to implement both Encoder and Decoder protocols. But after implementing Encoder (and type_code callback), developer needs to pass the same type code to Jerboa's config. What do you think about removing type_code callback from Encoder, and rely on type codes passed independently of protocol to function generator, just like we do with external attributes?

@mentels mentels force-pushed the attributes-extensibility branch from 677b655 to 3c80efa Compare April 4, 2017 10:15
@jerboabot
Copy link

Ebert has finished reviewing this Pull Request and has found:

  • 5 fixed issues! 🎉

But beware that this branch is 18 commits behind the esl:master branch, and a review of an up to date branch would produce more accurate results.

You can see more details about this review at https://ebertapp.io/github/esl/jerboa/pulls/84.

@mentels
Copy link
Author

mentels commented Apr 4, 2017

@arkgil for me it looks worse now. I liked it more with Encoder.code_type/1 as it was cleaner for the internal attributes. However, we would have to stick to the the {type_code, attr_mod} approach for the external ones.

I'm not convinced we would want to merge that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants