Live data from Hacker News

Functional Programming at Facebook

scs.stanford.edu

11–20 of 102 posts

Re: Functional Programming at Facebook

#11
post #2

Well also WhatsApp handling 1B+ users with Erlang, and with (what used to be?) only a handful of engineers. But somehow the Haskell, OCaml and Scala users never want to include Erlang when talking about "functional". Even though it is probably the most practically used functional language.

The feature set of Facebook is much more complicated than WhatsApp. Most of WhatsApps features come out of the box with ejabberd too (which is what they used in the beginning). Is it really a fair comparison?

> The feature set of Facebook is much more complicated than WhatsApp

But the feature set of Facebook is not all implemented in Haskell or OCaml either. There is lots of PHP etc.

Re: Functional Programming at Facebook

#14

Earlier quoted context omitted.

In part, this is due to Haskell et al. are statically typed, which provides a higher safety guarantee than dynamically typed languages like erlang.

Although this reason sounds plausible, it is quite surprising since one of the first functional languages - Lisp was dynamically typed.

Lisp isn't a functional language.

Re: Functional Programming at Facebook

#15
post #8

Earlier quoted context omitted.

Because there's functional as in only using pure functions (Haskell, ocaml) and functional as in access to higher order functions (JavaScript, erlang, clojure)

i thought ocaml ain't pure like that?

You thought right. Ocaml is an impure functional language.

Re: Functional Programming at Facebook

#16
post #2

Well also WhatsApp handling 1B+ users with Erlang, and with (what used to be?) only a handful of engineers. But somehow the Haskell, OCaml and Scala users never want to include Erlang when talking about "functional". Even though it is probably the most practically used functional language.

Because there's functional as in only using pure functions (Haskell, ocaml) and functional as in access to higher order functions (JavaScript, erlang, clojure)

> Because there's functional as in only using pure functions (Haskell, ocaml) and functional as in access to higher order functions (JavaScript, erlang, clojure)

Or functional as having proper closures.

Or tail call elimination.

Or using immutable data, or immutable variables.

Or minimizing mutable state.

Or being decalrative.

etc...

;-)

Re: Functional Programming at Facebook

#17
post #13

> Even though it is probably the most practically used functional language. Scala have 30th place on Tiobe index, while Erlang have 42th: http://www.tiobe.com/index.php/tiobe_index .

I find it very interesting that Scheme beat out extremely fashionable languages like Rust and Go, not to mention Clojure didn't even make the first 50. I would expect Lisp and Prolog at the tail end of any such list.

Re: Functional Programming at Facebook

#18
post #13

> Even though it is probably the most practically used functional language. Scala have 30th place on Tiobe index, while Erlang have 42th: http://www.tiobe.com/index.php/tiobe_index .

https://en.wikipedia.org/wiki/Argumentum_ad_populum

Has no relevance to actual language quality, potential or value.

If this wasn't the case, then no language would ever pass, or fall behind, another language in popularity.

Popularity is a reflection of already-realized value. That's all.

Re: Functional Programming at Facebook

#20
post #7

Earlier quoted context omitted.

> Because there's functional as in only using pure functions (Haskell, ocaml) This is not true. Having written a good amount of OCaml I would argue that programming with side-effects in OCaml is extremely approachable - almost as much as Clojure. There are mutable data structures in the stdlib (Array, Hashtbl) and IO etc. is straightforward. Like Clojure, there exists a ref type which can be easily mutated. It's one…

leaving runtime asides, which do you enjoy more Ocaml or Clojure?

To add to ohnomrbil's succinct reply, I absolutely enjoy being scolded by OCaml's compiler. The type inference is just marvelous and the code is almost as concise as Python etc. OTOH, the library ecosystem for OCaml is not even close to the stuff that's available for Clojure.
Post reply on HN