Skip to content
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

Abstract encoding and decoding type classes #335

Closed
travisbrown opened this issue Jun 30, 2015 · 4 comments
Closed

Abstract encoding and decoding type classes #335

travisbrown opened this issue Jun 30, 2015 · 4 comments

Comments

@travisbrown
Copy link
Collaborator

We currently have DecodeRequest and EncodeResponse type classes, which works well for creating servers. The needs of clients (see #228) are very similar, though, and introducing new DecodeResponse and EncodeRequest type classes would duplicate a lot of code.

Last night I started playing with more generic Encoder and Decoder type classes, and I think it's worth investigating whether that's a viable solution.

@vkostyukov
Copy link
Collaborator

@travisbrown Looks very interesting!

I wish we could also get rid of EncodeAnyResponse and DecodeAnyRequest.

@vkostyukov vkostyukov added this to the Finch 0.9.1 milestone Nov 10, 2015
@vkostyukov vkostyukov modified the milestones: Finch 1.0.0, Finch 0.9.2 Nov 18, 2015
@vkostyukov vkostyukov modified the milestones: Finch 0.9.3, Finch 1.0.0 Dec 6, 2015
@vkostyukov
Copy link
Collaborator

I guess we've already moved towards that direction having Encode abstracted over its content type (see #541).

@vkostyukov
Copy link
Collaborator

As per (#663) Decode now embeds content-type (a type-level string) making the whole story about implicit decoder/encoders in Finch "more explicit".

@travisbrown do you think this could be closed now?

@travisbrown
Copy link
Collaborator Author

Yep, thanks @vkostyukov!

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

No branches or pull requests

2 participants