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

> As far as performance goes, once you commit to a language with no mutable types, you have no recourse once you discover a bottleneck due to immutability. That's a big worry.

There are always escape hatches for when you absolutely need mutability.

> And advanced type systems are not unique to functional languages.

True. It's just that a lot of progress (but not all, of course) in advanced type systems is pioneered by languages which are often described as functional.

> So yeah, correctness and testability. It's available in most languages.

Correctness and testability are properties of the software, not the language. As such, of course you can achieve them with your favorite one. But some languages provide better tools to achieve some degree of correctness and testability which would require a greater effort with other languages.

> Also, what's up with all the single-letter variable names?

This is standard practice in many functional languages. Whenever the abstractness goes up (or the "more general" something is), the identifiers become shorter, since the name itself "means less". Hence why you see code that does something to every x in some kind of container xs; what would you gain with longer identifiers, except maybe misleading the reader?



Also, any imperative algorithm can be translated into a functional algorithm with, at most, O(log n) increase in complexity, and usually with none.




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

Search: