Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

I think it depends on whether you have type inference or not. If you have type inference, then it's like unification. If you have explicit type annotations, it's even simpler than that.

https://eli.thegreenplace.net/2018/unification/

https://eli.thegreenplace.net/2018/type-inference/



And if you want nominal sub typing, F-bounded generics, and some inference, things get really fun.


Nominal subtyping is trivial and unsafe. The fun starts with structural subtyping.


Nominal sub typing is hard from trivial and calling it unsafe is non-sensical. Structural subtyping yields poor error messages and does not support encapsulation very well, especially if you also want separate compilation.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: