TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Implementing and Understanding Type Classes (2014)

118 pointsby jezabout 7 years ago

2 comments

calebhabout 7 years ago
I&#x27;ve looked at this page and some other documents since I wanted to implement type classes in Juniper (a FRP language for the Arduino). It turns out that the dictionary passing is only necessary if you want to support polymorphic recursion. In all other cases, the call to a function that is part of a type class can be monomorphized.<p>Hindley-Milner has problems with inferring types in the presence of polymorphic recursion, and a user provided type annotation is usually necessary. Polymorphic recursion does allow some cool things such as arbitrarily nested lists. This is a feature that users from a dynamically typed language might miss.
评论 #16949790 未加载
评论 #16949963 未加载
评论 #16949266 未加载
评论 #16949438 未加载
评论 #16950861 未加载
评论 #16951025 未加载
评论 #16948995 未加载
brianbernsabout 7 years ago
As an F# developer (no type classes), I found this very informative. Thank you. I&#x27;m looking forward to the day when .NET languages (including C#) support type classes.