News for hackers. Stuff that matters.
Re:Roc rewrites the compiler in Zig by btreecat on Tuesday February 04, 2025 @03:37PM (#42938232)
> If FP isn't good for writing a compiler, what is it good for?

Summing the Fibonacci sequence I guess.

Re:Roc rewrites the compiler in Zig by agumonkey on Tuesday February 04, 2025 @03:56PM (#42938521)
other FP languages bootstrapped onto themselves IIRC
Re:Roc rewrites the compiler in Zig by incrudible on Wednesday February 05, 2025 @08:12AM (#42948016)
FP is bad for computing the Fibonacci series unless you have the compiler optimization to turn it into a loop (as seen in imperative languages).

To be fair, most practical FP languages have that, but I never saw the appeal for a strictly functional general purpose language. The situations where I wished one could not use imperative constructs are very domain specific.