Comment

Comment by SleekoNiko

I've tried going down this route myself by using libraries like fp-go[1]. I think this particular project has done a great job, but I ultimately opted not to pursue functional programming in Go for a few reasons:

- Ergonomics weren't the greatest when working with monads such as options and results. I think pattern matching is needed here, but concepts like those go against Go's core design philosophy.

- I suspect there are several cases where runtime performance is an issue, but admittedly did not investigate this.

- Perhaps most importantly, it deviates from the way most people read and write Go, and less importantly, LLMs struggle too.

Because of these reasons, I came to the conclusion that the advantages were not worth the trade-offs.

Perhaps somebody will create a garbage-collected Rust-like language in the future and bridge the gap between the two languages.

[1] - https://github.com/IBM/fp-go

parent SleekoNiko 2 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton