Hacker News new | past | comments | ask | show | jobs | submit login

it's not doing anything particularly interesting from a formal perspective. If you're familiar with Haskell's newtype deriving, the tilde is solving the same problem—just at the use-sites of the type instead of at the declaration site. The types it tends to be useful for are the types that Go allows as constants (https://go.dev/ref/spec#Constants), which tend to be the type classes that modern Preludes will overload the literals for.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: