Comment

Comment by centimeter

> FP's conceit is trading performance for correctness.

This isn't even remotely the case. The most popular functional languages are substantially faster than the most popular imperative languages.

Haskell or OCaml both smoke the top 3 imperative languages: Python, Java, JavaScript.

The "conceit" is trading the conceptual model most people learn in high school/trade programming classes for correctness, with little to no bearing on performance.

> Rust is, as far as I'm aware, the first language that allows you to deploy functional concepts as zero-cost abstractions.

This is definitely not the case. You can deploy zero-overhead functional concepts in C++ using template programming, constexprs, etc. Also, "zero-overhead" compared to what? Plenty of functional language have abstractions that can reasonably be described as zero-overhead, like newtypes in Haskell or functorial modules in OCaml. You can even translate the non-monomorphically-recursive subset of Haskell to pure hardware, which is pretty much the definition of "zero overhead".

This article reads more like a regurgitation of taglines than original thinking.

parent centimeter 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton