Skip to content

Instantly share code, notes, and snippets.

Last active Jun 19, 2019
What would you like to do?
Ocaml / functional programming

I'm taking down this post. I just posted this as a side comment to explain a sentence on my latest blog post. This wasn't meant to be #1 on HN to start a huge war on functional programming... The thoughts are not well formed enough to have a huge audience. Sorry for all the people reading this. And please, don't dig through the history...

Copy link

rwmjones commented Dec 23, 2017

I've been programming OCaml for years and I too miss early returns. However there is a good solution. There was a long discussion about this on the OCaml mailing list a few months back, and there are various with_return modules. My contribution to the art is this implementation.

Copy link

jonsterling commented Dec 23, 2017

at least now I know it must be pretty easy to get a job at fb, in case i need a backup

Copy link

btnwtn commented Dec 23, 2017

@jonsterling you seem like a wonderful person to work with.

Copy link

ghost commented Dec 23, 2017

There is a lot of really good reasons why functional programming isn't good for every use-case. It would be meaningless to enumerate them here as they're obvious if you take a bit of time to look for them. This gist (unfortunately) doesn't make any good arguments against using the paradigm :(

Copy link

goofballLogic commented Dec 23, 2017

Worth reading the history on this one

Copy link

Delaunay commented Dec 24, 2017

He is right, this is exactly how I felt when I first switched to functional programming.
Nevertheless, with time, you start to adapt yourself and get it and FP starts to make sense.

Although, I still dislike the way FP people thinks brevity increase readability... I mean look at APL, it is short.
Furthermore the examples they pick are always too simplistic to make a point.

Finally, the performance of FP is something I am very interested in and I was never able to found something about it.
I am also worried about the cache unfriendliness of lists but everybody seems to forget about processor cache when working on distributed systems, on a other side Scala does allow you to use arrays instead of lists and I am mainly using arrays anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment