[HN Gopher] A History of Erlang (2007) ___________________________________________________________________ A History of Erlang (2007) Author : vinnyglennon Score : 70 points Date : 2020-04-05 09:21 UTC (1 days ago) (HTM) web link (dl.acm.org) (TXT) w3m dump (dl.acm.org) | mycall wrote: | I don't understand why people don't like Erlang so much [1]. It | has many excellent features and the runtime stability is | unmatched. | | [1] https://www.codementor.io/blog/worst- | languages-2019-6mvbfg3w... | seagreen wrote: | I've had trouble getting into it because the ergonomics are so | incredibly, wonderfully, art-project level rough. | | For example: $ erl Erlang/OTP 20 | [erts-9.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] | [async-threads:10] [kernel-poll:false] Eshell | V9.2 (abort with ^G) 1> 2 + 2 1> 2 + 2. | * 2: syntax error before: 2 1> 2 + 2. 4 | | Note the trailing whitespace(!) after the last `2 + 2. `, | necessary for the result to be printed. | | I was coming from Haskell which has its own very serious | tooling and ergonomics problems. Trying Erlang made me realize | things could be even worse. My internal model in my head of | language designers/promoters is COMPLETELY wrong, I have | absolutely no idea how people could spend time promoting | languages with such strange tooling to a general audience with | any expectation that it will work.[1] | | [1] Not to say that these languages/tools aren't awesome. | Trailing whitespace matters semantically absolutely not at all. | But if you're trying to promote a language with meaningful | trailing REPL whitespace to a general 2020 audience there is | some terrible mismatch between your expectations and your | actual chance of success. | moreoutput wrote: | What am I missing here? I see no meaningful white space when | running the same logic. I would expect this from any language | when expressions aren't properly terminated. | | Eshell V10.4 (abort with ^G) | | 1> 2+2 | | 1> 2+2. | | * 2: syntax error before: 2 | | 1> 2 + 2. | | 4 | | 2> | WilliamEdward wrote: | It's gaining a good track record because big industry giants | are using it, but it's hard to force functional languages on | people. The majority of people will learn OOP for a number of | reasons unrelated to how good it is, while functional is | becoming more like a niche artisanal craft. | johnmarcus wrote: | In me experience using Phoenix, it takes an eternity to | compile. I imagine that turns a lot of folks off to begin with. | 1_player wrote: | Eternity? My 50kloc Elixir project compiles about the same | time as my 10kloc next.js/React project. | | I've never noticed any compilation issue on my machine, | though it's a beefy one (and still JS takes ages) | [deleted] | 1_player wrote: | What a stupid list that is. Rust, Typescript, Elixir, Haskell, | C not worth learning in 2019? | | If you know zero languages, yeah, go learn Javascript, Python | or (ugh) Java. If you know one or more language, the ones | listed above are definitely worth your time. | | You might find it a little hard to make a career out of knowing | only Elm, but you might not grow very much professionally | without widening your horizons a bit either. | imglorp wrote: | All true, plus other advantages, but I think there are some | business requirements that prevent adoption. The syntax and | runtime model are unfamiliar and there aren't enough users to | get dependable critical hire biomass on a new project. Lots of | management would rather have a lot of average, commoditized | labor than a little rare, elite few. | | It's especially tragic because we keep repeating the same | mistakes and discoveries over and over that OTP+Erlang solved | ages ago. Eg most environments are still dinking around with | clumsy hacks to help with GC and concurrency issues. | cpach wrote: | _"Lots of management would rather have a lot of average, | commoditized labor than a little rare, elite few."_ | | Very well put and probably very true. | lostcolony wrote: | It is. Management will invariably say "We want the best!", | and they may even pay comparable to FAANG levels, but when | it comes to language/runtime, it's "We need to be | consistent" and "We need something we can hire for". | | Meaning even if management understands that a | language/framework can be a competitive advantage, they | will still be optimizing for lowest common denominator. | rukittenme wrote: | I like erlang. But erlang's syntax doesn't do it any favors. | Might as well use elixir. Still the beam. | | I also don't think the beam's benefits are necessary for the | vast majority of software which makes it perma-niche. "Why use | erlang when I can use python, a database, and a distributed | task queue?" | | I also really like Elm so I was sad to see it in the poll | position, but I also don't base my language choices off of | someone's blog. | macintux wrote: | Unfamiliar syntax is not the same as bad syntax. Erlang's | syntax is much simpler than Elixir's, and generally more | concise. | crusso wrote: | I guess it depends upon what you mean by "unfamiliar". | Erlang's syntax is unnecessarily divergent from a lot of | mainstream languages. So much so that it makes it more | difficult for mainstream developers to get into. | | Elixir was modeled after Ruby for a reason. That reason was | Ruby's very approachable and intuitive syntax. | [deleted] | lostcolony wrote: | It makes it easier for people to dismiss it; it actually | is easier to learn. | | Erlang it took me two weeks to become proficient enough | to write useful things, without any real FP background. | That includes leveraging OTP. | | Even with that in place (plus a lot of Java, Javascript, | some others, plus many more years of experience), it took | me longer to be comfortable with Elixir, and there are | still bits that surprise me or bite me (pinning a | variable to match it rather than rebind it, macros, etc). | Jtsummers wrote: | What's hard about Erlang's syntax? People keep telling me | it's hard, but I was literally failing out of college at | the time and still managed to learn it without much | trouble (perhaps a month of occasional practice). I give | that context because I can't imagine that I was | struggling that much with school if I'm significantly | above average for our field. | crusso wrote: | "People keep telling me it's hard" | | Shouldn't that be enough to let you know that people at | least don't find it to be intuitive? | Jtsummers wrote: | No, because no one has ever explained how it's hard. They | just keep repeating that refrain, and to date I haven't | heard it from someone who spent more than a day with the | language or gave it any serious consideration. | | If people can enumerate the problems with the language | (like I've seen or done for other languages), then I'll | entertain the complaint. | | So far the closest thing to a real complaint has been | about variables-not-being-variables (in the C, anything | can change, sense). But this is 2020, mutable-by-default | is a known bad idea so this is hardly novel or a | challenge. | | The other reason I've heard is the lack of loops. If a | professional programmer can't handle recursion, they need | to go back to basics. I'm not trying to be mean with that | one, but recursion is pretty easy. | rukittenme wrote: | I agree with you. Erlang is not as hard as people make it | out to be. However... | | Look at this piece of code: https://github.com/erlang/reb | ar3/blob/master/src/r3.erl#L32-... | | In this example the keyword "end" ends with "", ";", and | "." all within 6 lines of each other. | | In this example the keyword "ok" ends with "" and ";". | | In this example `Self` "exclamation marks" `Ref`. | | All of this is easily understood with some experience but | you have to admit that `erlang.send(Self, Ref)` is much | more easily understood than some symbol that has to be | googled. And consider this, a junior dev is going to be | overwhelmed with all the syntactic sugar. They're just | learning how to define and call functions. | | All of these issues matter if your goal is to on-board as | many hobbyists and juniors as possible. (Which shouldn't | be the goal of every language). | | I'm very happy with Erlang. I don't want it to change. | h91wka wrote: | I have long since learned that dismissing languages based on | their syntax is very punitive, as novel and powerful | languages very often come with unfamiliar syntax. Syntax is | the least difficult thing to learn. Things like type system, | approach to concurrency and memory management are orders of | magnitude more important. | elcritch wrote: | Generally true, but there's also such a large convergence | on Algol style syntax these days that your mind builds up | familiarity with them. That makes groking them quicker. | | Well for me looking at Erlang code is akin to looking at | 'vase or two faces' photo, due to lower case being atoms | and uppercase being variable names. And I dislike having to | change ',' to '.' or vice versa when editing lines. Though | three ',' and '.' endings do have an elegance to them. | | Elixir is nice in that it is similar enough to Julia that I | can copy and paste pieces of code and make minor edits to | translate. Even javascript is relatively similar if | map/reduces are used. Python is a bit harder due to white | space blocks and list comprehension. | davidw wrote: | The ,.; line endings are a PITA when you refactor. I've | heard them referred to as 'ant turd tokens'. It's a minor | nitpick though, I still like Erlang a lot. | elcritch wrote: | lol, that's a unique description. A good linter could fix | them, but they drive me crazy. I tend to shift lines | around more than any other editing. | rukittenme wrote: | Sure but I'm talking about on-boarding and generating | developer interest. Appeal to junior developers and | hobbyists is critical for large scale adoption. And like it | or not a hobbyist's barriers to entry are different than a | senior software engineer's. | h91wka wrote: | > Appeal to junior developers and hobbyists is critical | for large scale adoption. | | Hmm, I have personally trained Erlang to half a dozen | juniors and interns. Any person who knows basics of | programming can pick it up and write/fix mundane business | code in less than a month. And I am a horrible teacher. | PopeDotNinja wrote: | The more I've played with Erlang, the more I've liked its | syntax. What I don't like is dealing w/ strings in Erlang. | salimmadjd wrote: | 100%! I actually prefer it now over elixir. Once you get to | use it and spend a few weeks working with it, it becomes so | expressive and it feels so clean to read and understand. | [deleted] | callamdelaney wrote: | I actually find Erlangs syntax a breath of fresh air. Coming from | Python, this may sound odd, but there's something soothing about | it. | | I much prefer Erlangs syntax to Go, for example. I also much | prefer Erlangs syntax to Elixir; I never liked ruby either, so | there's perhaps no surprise there. | waynesonfire wrote: | i completely agree. ___________________________________________________________________ (page generated 2020-04-06 23:00 UTC)