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

This article reads like something from 2010. Other than Go, new languages no longer have null references and you don’t need a purely functional language to do so. I kept waiting for more examples for why we need FP but the article yada-yada-yada’d the rest

I think FP came and showed everyone how to design expressive types, how to define flatMap on more than arrays, and that’s it. It turns out you don’t need Haskell, you can incorporate those features in imperative languages like Rust and Swift.



The "blue collar" approach to functional programming is a fruitful one.

Written about Scala, but applies to any language: https://www.lihaoyi.com/post/StrategicScalaStylePracticalTyp...

In doing this, program organization starts to change in interesting ways. Modeling error states as regular data cleans up a lot of complexity.


> I kept waiting for more examples for why we need FP

Dependent types, allow a lot more type safety (ex. shader program type parametrized by description of its uniform variables, getting rid of `INVALID_OPERATION` on wrong uniform location/type).

> you can incorporate those features in imperative languages like Rust and Swift

Incorporating dependent types into imperative languages with unrestricted effects is hard (impossible?).




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

Search: