Live data from Hacker News

Elm changed my mind about unpopular languages

blog.realkinetic.com

231–240 of 321 posts

Re: Elm changed my mind about unpopular languages

#231

Earlier quoted context omitted.

Worth noting that in our experience, hiring has gotten way easier for us since we became an Elm shop. We really struggled to hire React engineers (who have a zillion positions to choose among - why would they pick ours?), whereas there seem to be a lot more great programmers who want to use Elm than there are companies hiring for Elm positions. Here's a verbatim quote from a cover letter (one I happened to be reading…

Worth noting is that you haven't been able to find a single criticism of elm in years. You hired the language designer so it's understandable that you'd have an easier time with the language. However, you've consistently kicked dust in everyone's eyes every time anyone has anything remotely critical to say about elm. It's frustrating because you are so smart and so insightful and it just looks like you're deliberatel…

His FrontEnd Masters course demonstrates this to be false. He was straightforward about the language and acknowledged shortcomings around things like JSON decoders, for example.

Furthermore, last I checked the source code doesn't live inside Evan's head like a family recipe. The functional principles and clear Haskell influences won't die if Evan were to go away.

Re: Elm changed my mind about unpopular languages

#232
post #226

I wonder how to become a good functional programmer. I think I'm already decent at procedural/OO. Do I need to have a strong maths background? I didn't learn it very well at university and this worries me. Many functional language fans seem to have degrees in maths.

I don't think so. If anything I feel it's a bit easier as you don't need to reason about object state. It's also different, which is the main hurdle. If you use emacs you've already been exposed - Emacs Lisp is functional. If you're coming from a Web background both Elm and Elixir are great places to begin. You'll often hear stuff like "Javascript can be written in a functional style" - which is true, functional programming is a paradigm you can just go with - but seeing it really embraced by the language is really inspiring.

Re: Elm changed my mind about unpopular languages

#233
post #162

Earlier quoted context omitted.

I notice Scala missing from your list - if you need the JVM or find Elm to not quite have what you need, it's a great language. It's basically the opposite end of the spectrum, design-wise - Elm is "let's create this highly opinionated, carefully curated language and try to make it perfect" and Scala is "let's throw every feature we can derive into our type system and let people work it out". It's got it's issues (mo…

Scala's flaw - and Elm's strength - is it is a massive language that allows for a large amount of magic to happen. Elm is by comparison tiny and extremely explicit, and error messages thrown by the compiler are almost always super helpful. But Elm can't (really) be used on the server, so it doesn't hurt to look at Scala there, though be prepared to have a hard time finding experienced engineers to hire.

Id argue that while Scala has more powerful features, it has less "magic". Elm can't be used on the server because it has a magical create app function that you must feed the exact right functions into in order to make anything. AFAIK it's not a general purpose language.

Re: Elm changed my mind about unpopular languages

#234
We use(d) Elm at the company I work at. (A start-up.) Elm is great. All of the positive rumors about it are true.

The issue we've had with Elm isn't typically discussed in these conversations: My CTO doesn't seem to see the value of it+. So we recently replaced our Elm code with JavaScript.

I wonder if anyone else finds themselves in a similar situation.

+It's a bit more nuanced. We're in a very "MVP" stage; the line of thinking is to use something everyone's more familiar with so we can move fast.

Re: Elm changed my mind about unpopular languages

#235
post #226

I wonder how to become a good functional programmer. I think I'm already decent at procedural/OO. Do I need to have a strong maths background? I didn't learn it very well at university and this worries me. Many functional language fans seem to have degrees in maths.

FP is mostly a state of mind - of course picking the language really helps about incentives, but you can do it even in Java/C# (in fact if you do C# there is the great LINQ library that helps).

How to approximate FP in a mostly OOP language:

- use immutable data structures: there is no way around being able to fearlessly modify something. The naive way is to copy the object before touching it, the better way is to use efficient structures, e.g. Clojure data structures from Java.

- you either have data classes (no methods, no private fields), or execution classes (no data fields, only static methods), no mixing

- of you stick to the above, you will find that returning void from a method is very difficult.

Congrats, you're doing FP: the gist of it is that it's all about keeping state explicit; if you pass some A in a function, you will return a B at some point, and that's your result. No implicit state.

Of course, we're missing the whole part about side effects, so to add to the above: if you cannot write a unit test without mocking something in your method, you're doing side effects. They should be done only at the "border" of the application, to (maybe) get you the data you need, so you can bring it and process it in the pure core.

And this is where languages like Haskell help: to understand where the side effects are (because they are included in the types) and to prevent mixing them around (which only gets you an untestable mess in the end).

HTH

Re: Elm changed my mind about unpopular languages

#236
post #92

Earlier quoted context omitted.

But are language enthusiasts really better hires in general? I've known many of them who loved the theory and toying with a language but were not any better at producing actual value than the average joe.

> But are language enthusiasts really better hires in general? I've known many of them who loved the theory and toying with a language but were not any better at producing actual value than the average joe. I think they may be safer hires, anyway. They will be able to program themselves out of a wet cardboard box, which is more than you can say about the average Joe who may just be good at bluffing the interview.

True, I'd much rather someone who spends their time learning Elm than Cracking The Code Interview.

Re: Elm changed my mind about unpopular languages

#237

I built this in browser database app entirely in ELM. Since there is no existing rich component library available I had to write everything including a high performance grid implementation from scratch. The entire app took about a week and has zero runtime bugs since launch. I have to give credit to Elm for most of that. https://bellpluscat.com/

This looks great. Btw why save to google drive instead of google sheets?

Re: Elm changed my mind about unpopular languages

#238

> Even though Elm is a small language with a small community, that doesn’t affect the Elm experience in a noticeable way. This conclusion was pulled out of thin air, with no justification from the rest of the article. The title is misleading, the article is really about why the author enjoys Elm over JavaScript... The general rule of thumb that a larger active community leads to faster software development is more or…

> The general rule of thumb that a larger active community leads to faster software development is more or less still true. There is no reason to suspect this is not the case with Elm. Yes, and not only because the volume of copy-paste source code on StackOverflow. I suspect Elm is slower to get a feature out, but once it is out you spend less time fixing bugs in feature A caused by adding feature B silently changing…

> There is a community. The community tends to have smarter on average people in it. Simply because all the less smart people are put off.

A community shouldn't be judged based on how smart everyone is (quite a difficult measure), a more useful metric would be how many useful community libraries there are. For example, if I can choose between 50 carousels implemented in React vs. 2 in Elm, and I'm an average developer -- what will I choose?

Modern JavaScript undoubtedly towers over Elm in terms of go-to-market time for arbitrary apps.

> you spend less time fixing bugs in feature A caused by adding feature B silently changing some assumptions you made in code.

This is a big problem with 2007 JavaScript and jQuery. React/Vue and other declarative VDOM frameworks bring the Elm philosophy to the masses.

Re: Elm changed my mind about unpopular languages

#239
post #233

Earlier quoted context omitted.

Scala's flaw - and Elm's strength - is it is a massive language that allows for a large amount of magic to happen. Elm is by comparison tiny and extremely explicit, and error messages thrown by the compiler are almost always super helpful. But Elm can't (really) be used on the server, so it doesn't hurt to look at Scala there, though be prepared to have a hard time finding experienced engineers to hire.

Id argue that while Scala has more powerful features, it has less "magic". Elm can't be used on the server because it has a magical create app function that you must feed the exact right functions into in order to make anything. AFAIK it's not a general purpose language.

Definitely not general purpose, but it has nothing asking the line of implicits and implicit type conversion and the such that makes reading Scala code impossible to read, if not write, without a tool like IntelliJ.

Re: Elm changed my mind about unpopular languages

#240

Earlier quoted context omitted.

> The general rule of thumb that a larger active community leads to faster software development is more or less still true. There is no reason to suspect this is not the case with Elm. Yes, and not only because the volume of copy-paste source code on StackOverflow. I suspect Elm is slower to get a feature out, but once it is out you spend less time fixing bugs in feature A caused by adding feature B silently changing…

> There is a community. The community tends to have smarter on average people in it. Simply because all the less smart people are put off. A community shouldn't be judged based on how smart everyone is (quite a difficult measure), a more useful metric would be how many useful community libraries there are. For example, if I can choose between 50 carousels implemented in React vs. 2 in Elm, and I'm an average develope…

> A community shouldn't be judged based on how smart everyone is (quite a difficult measure), a more useful metric would be how many useful community libraries there are

That seems more of a metric for an ecosystem than a community.

Post reply on HN