Wondering about Typeclasses

A good programming language only has either tagged unions or custom typeclasses - not both.

A good post does not have both a bold claim and an explanation?

3 Likes

I have a gut feeling that you have very specific and limited list of “good” languages …

+1. Through reading the conversation I’ve gained a lot of understanding about the tradeoffs and nuances.

For me it’s the exact opposite - whenever one of the two is missing I find the other to fall short in some scenarios I face. I honestly don’t understand why you should be limited like this, they are two non-overlapping solutions to significantly different problems.

2 Likes

This conclusion makes no sense.

Tagged unions without custom typeclasses = your types feel 2nd-class compared to the built-ins

Custom typeclasses without tagged unions = how do you even do functional programming here??

2 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.