elamje / FunctionalProgrammingCompanies

This is a list of companies that use a Functional Programming Language for their core products. Use this as a starting point for your FP job search.
39 stars 5 forks source link

Why is Erlang here? #2

Closed StoneCypher closed 5 years ago

StoneCypher commented 5 years ago

Erlang is functional in the way that C++ is functional - it offers tools for FP, but most users aren't generally FP, and the standard library OTP is heavily stateful

You name Whatsapp, which is an implementation of eJabberD, which is almost not FP at all

elamje commented 5 years ago

Thanks for bringing this to my attention. I was under the impression that Erlang was highly functional, but I have never used it. A couple of the listings were just based on things I read online, such as WhatsApp using Erlang (and I assumed that meant functionally).

Can a couple of others confirm the OPs take?

ddresselhaus commented 5 years ago

I guess "functional" can mean a lot of different things, but Erlang does have immutable data and first-class functions. It might not have the focus on purity that Haskell does, but I don't think that means it's not functional.

ahoka commented 5 years ago

One can argue that Lisp is not functional with the same logic, so I guess you can dismiss it as nitpicking.

StoneCypher commented 5 years ago

erlang data is not actually immutable. variables are, but the process dictionary isn't, and neither are the various datastructures implemented in modules, like gb_trees and array

erlang is functional in the way that c++ is - it's theoretically possible to use it that way, and people will say things like "well templates are pure" trying to look smart, but in practice it is not actually used that way, the standard library is not built that way, and none of the books about it teach to use it that way

erlang is not meaningfully a functional language. this is not nitpicking - this is astonishment from an active user that someone would try to represent it that way

elamje commented 5 years ago

I will wait to get more feedback on your concern. Wikipedia highlights Erlang as a functional language, as well as several hacker news posts. Ultimately this list is made to help others find jobs in functional programming, and more people will be perturbed by this in the future if it is inaccurate. Thanks for your input

StoneCypher commented 5 years ago

Wikipedia highlights Erlang as a functional language

-module(side_effects).
-export([ oops/0 ]).

oops() ->
  put(example, "bob"),
  io:format("Example is currently ~s", [get(example)]),
  put(example, "dave"),
  io:format("Example is currently ~s", [get(example)]).

I guess I'll leave as requested