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

Blog post: Why Type Classes? #61

Open
jducoeur opened this issue Jul 28, 2022 · 0 comments
Open

Blog post: Why Type Classes? #61

jducoeur opened this issue Jul 28, 2022 · 0 comments
Labels
blog Possible blog articles that we should consider

Comments

@jducoeur
Copy link
Member

Hypothetical blog post that might be quite helpful, for anyone who wants to pick it up.

Lay out the argument for why type classes are a helpful way to do things. Ideally, this should not waste much time getting into the nitty-gritty of what a type class is, just link to the details (where?). Instead, focus on why type classes are a good business decision -- how they help promote better, more maintainable designs via cleaner abstractions. Provide examples of various sorts of type classes from various TL libraries. Make the case that they are fine from an efficiency POV, and not nearly as complicated as some people make it sound -- they're just a different kind of interface.

In particular, emphasize the way that the type class approach promotes better flexibility down the road, and resists too much lock-in: by stating exactly your requirements, it allows you to use whatever components fit those requirements. Possibly say in as many words that a type class based approach to the IO level allows you to be flexible even about the main engine driving the applications, and thus resists lock-in. Be clear that this is why, while cats-effect has a world-class IO engine, we tend to think of the type classes as the most important part, so that the users have this long-term flexibility.

@jducoeur jducoeur added the blog Possible blog articles that we should consider label Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blog Possible blog articles that we should consider
Projects
None yet
Development

No branches or pull requests

1 participant