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

...and my impression is that FP and OOP are complementary rather than mutually exclusive. But I only have basic understanding of FP.


Yes. Alas, most of the automagic type inferences we are used to in FP languages (Hindley-Milner) does not play too nice with OOP's class members.


What if class members had to be typed?


They are (in Scala).

I think it's overloading (punning on static type of the same function, operator, or method name) that makes explicit type declarations more often necessary in Scala than in Haskell or ML.




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: