I work mostly in Python for data analytics but I like to play with front end from time to time. So I tried elm. I loved learning about the elm architecture and the concepts of a ml type of language. But the community and the principles of it threw me off. I need a simple parser and found this https://package.elm-lang.org/packages/elm-tools/parser/lates...
I guess if you have a CS degree you can understand how that parser works, I couldn’t. The community tried to help me on the forums but you are supposed to know a lot of key functional concepts to even understand their answers.
However I became a better programmer thanks to elm. I would love for something like ocaml to pick up more steam in data analytics. I think though python won that battle for good principles (easy to use) and not for being functional, or controlling side effects or having less bugs. If you think about it that’s exactly why Excel is still so popular, it’s a monster but it’s easy to use.
> I guess if you have a CS degree you can understand how that parser works, I couldn’t. The community tried to help me on the forums but you are supposed to know a lot of key functional concepts to even understand their answers.
Have you tried writing a simple parser (i.e. just recursive descent) yourself in another language like Python? If so, you'll find the approach of using parser combinators in your Elm example rather superior. If you do not currently understand the foundational concepts of writing a parser, perhaps you should understand them before starting to write a parser.
Or perhaps consider this. Can you get by without writing a parser? If the grammar you're trying to parse is well-known you might find an existing parser; if the grammar is extremely simple you might just use a few string manipulation functions to get the job done.
> To test out the latter, in the summer of 2017 we tasked a team of summer interns with the renewal of our seat map application, a crucial component of the ticket booking process. They were to use Elm, a language they had no prior experience with. To our surprise they took to the language very easily, and their work turned out great.
I think programmers—myself included—tend to be surprised by these stories, because we envision two learning curves: general programming concepts, plus the additional weirdness of learning Elm.
But "general programming concepts" unpacks into: A) valuable stuff everyone needs to learn anyway, B) a bunch of hard-bought mental discipline which Elm makes obsolete, due to its lack of side effects and mutable state. Going cold-turkey into Elm, newcomers fast-forward through a lot of things JS learners for example have to wrestle through.
I think these niche but loved language are great ways to attract talent. I’m a senior C#/java dev but I dabble with F#,Rust and Elm on the side. I have mentioned to lots of recruiters that I’m interested in new opportunities only if they mean I can switch to one of these languages.
I know lots of people in my situation (from meetups etc).
There are few experienced Elm and Rust devs to recruit from, but there are tons of very experienced developers who would take a pay cut just to work with these languages.
What people know and what people want to work with are in my experience very loosely related.
> I bet that an old and badly designed Elm app would be just as bad to work with.
Not at all!
My company has used Elm since 2015, and I'd be happier maintaining our 4-year-old Elm code from before we knew what we were doing to any modern JS or TS project that's been built optimally according to any definition of JS/TS best practices you like.
I don't think that's an uncommon view among people who have used both Elm and JS/TS in production for a few months.
It's a pretty night and day difference in experience - that's why people who use Elm on the side for awhile so often end up valuing the opportunity to use it at work too.
I think the most attractive thing would be working with others who are also interested in languages.
I definitely believe that functional code bases rot less/slower than imperative/OO code bases. If it’s because the functional code bases are written by “better developers” that’s an even stronger argument for aiming for taking a job using one.
I used to think like that, then I realized that even the famous offshoring shops now also get projects done in those languages, with the same quality you would expect from their typically enterprise project deliverables.
> Everything we do at Vy is done in close collaboration with the customer.
To understand this correctly; 'we' means the company 'Bekk' and the customer is 'Vy', right?
I don't find it too strange that it is relatively easy to onboard new Elm programmers when they are part of the same company. But what happens when competing companies want to bid for jobs at Vy? Vy is after all wholly owned by the Norwegian Ministry of Transport and Communications, so new future contracts are bound to come up. A language decision like this–beyond the merit of the language itself–might create a vendor lock-in that can stifle competition. Without being an Elm programmer myself, I am not sure that the technical merits of Elm is really worth it when taking the competition aspect into condsideration.
> To understand this correctly; 'we' means the company 'Bekk' and the customer is 'Vy', right?
Good question! Vy has their own developers for this very reason. The teams here are a mix of Bekk and Vy developers, should Bekk be replaced by another company, someone will still remain to train the new developers.
The availability of developers is definitely something that should be considered when choosing technology. That said, NoRedInk, one of the companies earliest in adopting Elm have said they have had an easier time of hiring after they change to Elm from React. They are at least an indication of the opposite of what you are suggesting.
Also in Study of Programming Languages Not to Learn in 2019:
"As a final word, we wanted to reiterate that while the languages that didn’t perform well this year are useful and powerful in their respective fields, they may not have ranked as highly on our list because of the three metrics we chose. Therefore, if you really want to learn Erlang, Elm, or Lua, go for it — after all, these languages may make a comeback by 2020 because of your interest in them!"
I think one has to take the result in that article with a grain of salt as they only look at a very limiting set of metrics.
Also in the specific case of Elm I would recommend that people give it a try as it is a very different programming language than the most common languages and a great intro to the realm of strongly typed functional languages and functional thinking in general. Even if you don't end up liking or using it, it is a good thing to have experienced. There is always something to learn from learning new programming languages! ^^,
Elm was chosen in 2017, and initial development was being done by 2-3 developers. Now, development is being done by 15-20 developers. Some of those developers came because of Elm (like me) and some came because our problem domain is interesting, and then learned Elm on the job.
Choosing Elm for a project in 2017 seems to have been a very good move.
Elm could completely disappear from the face of the Earth next year, and I'd still be glad I learned it, and would still recommend it to others. The concepts have made me a better programmer in general, whether in Node, React or vanilla JS. Hard to explain until you've actually used the language.
The article lists several: static typing, guarantee of zero runtime errors, sane error handling using rich enums.
Other advantages: async is baked into the framework and isn't an afterthought like React. Immutability is standard and doesn't require a competing ecosystem of immutable datastructures like React. Also significantly smaller download sizes 
Elm is so small, I'd almost argue that it's easier to learn Elm and The Elm Architecture than it would be than to worry about some almost equivalent combination of TypeScript, React, Redux (which was inspired by TEA, afaik), etc.
From a business perspective, having 0 JS crashes or errors in production is nice. I say that as someone who works at a startup that switched to Elm in 2017 and have had that very experience.
I would argue that Typescript and React or Vue would have been a better solution for the customer. Yes, Elm might be better in some aspects, but I could name quite a few benefits for Typescript as well.
I think the technical reasoning is okayish, but from a business perspective I don't think the customer made a good choice.
> I would argue that Typescript and React or Vue would have been a better solution for the customer. Yes, Elm might be better in some aspects, but I could name quite a few benefits for Typescript as well.
That "study" says "which languages you probably should not learn as a first programming language".
Sure there might not be a whole lot of Elm jobs out there. But if there is one and you feel like learning Elm, what does it matter?
Also, since you talk about good programmers, surely a potential employer won't list it as negative that you've been able to switch technologies during your career? To me that's a strength rather than a weakness.
I'm in the process of replacing an Erlang service. Erlang is incredibly well suited for the task, and it's a terrible choice for us.
Initial development was done, system worked and ran for years. Team left, turned over and then 5 years later no erlang developers were left on staff.
The service is business critical, and you don't need 1 developer, you need a team. 3 would provide some basic backup, but you need 5 to fill out the 24/7 on-call rotation. (yes people need vacations, weekends off, etc)
Sadly it's not the entire stack, far from it, it's one mission critical service that's part of a very large system. So the excitement they get from growing, enhancing and scaling the system is already a bit restricted. Problem is, trying to hire is SF is already hard, and now we just selected the pool of engineers to be a small subset of those.
So now the cost of 3-5 engineers, the work to hire them, manager and deal with turn over. Wow.
Sadly (not sadly) we replaced the service with an AWS offering for $1000/mo. World changed in the 9 years since the Erlang product was first written.
With 0.2% of the jobs available in Norway mentioning Elm, and even if some of the companies using Elm might not state it in the job listing, I would say it is a fringe language here.
And I'm not debating what's possible technically, but if it was a wise business decision by the customer to choose Elm. Based on the popularity in Norway in 2017, today and what it likely will be in the future, I think they should have made a different choice.
> With 0.2% of the jobs available in Norway mentioning Elm, and even if some of the companies using Elm might not state it in the job listing, I would say it is a fringe language here.
You say 'here', so I'm going to assume you mean that literally, and that you are indeed in Norway. Forgive me for assuming the worst, but you seem to have an axe to grind against either Elm, Vy, Bekk, or something else based on your several posts on the story—is that correct?
The article, and others have pointed out, it appears to be a good business decision, as far as hiring is concerned. They haven't had issues with newcomers learning the language. The OP them self said that Elm was a selling point for working there.
As someone who recently lived in Norway, and who has used Elm professionally there, we've also found it to be a good business decision.
A lot of companies hire for 'polyglots' these days anyway. For the most part, I wouldn't want to hire someone who wouldn't be capable of picking up Elm to a decent level, relatively quickly. When mentioning that we used Elm, it usually elicited excitement.
I live in Norway, but I don't have any axe to grind with anyone. I work in the IT industry, but I'm not in the consulting business. As you probably know, Bekk has a very good reputation in Norway, and I know several people who works there now, or has worked there in the past. I do use Vy trains for my commute, and I'm not super happy with the service, but that's not my motivation for my comments.
It is more a concern regarding how the tax I'm paying is used. I understand that people are happy with Elm today. But how will it be in 5 years? Given the small Elm community, will it still be up to date then? Will it be easy to recruit then?
I know of other publicly funded projects in Norway where they ended up using non-mainstream languages, and where it became a problem in the long-term.
> I think they should have made a different choice.
Yes, you've asserted that several times here, based on next to no information.
As for recruiting, using Elm has put Vy in the spotlight several times the last years. So even if most people aren't elm developers, I think this has at least given lots of potential candidates a positive view on working there.
You don't need any Elm experience to program Elm. Web experience (HTML, CSS, APIs etc.) is useful because they are the problems you will bump up against. The learning Elm part would take little time. There are a lot of people who have done a bit of Elm on the side too so have a head start. Any Haskell lover who can't find a Haskell job might consider an Elm job.
I think it depends on the project entirely. A starving province in market ruled society that wants to get something for as little money as possible will act differently from a rich Scandinavian nation where utilitaristic ideas are widely spread and people agree to spend more to get good things for everybody.
I've cross trained a few react/redux devs onto Elm and it's been a really easy shift for them. Many js devs are leaning more on a functional style anyway, for those devs Elm gives them a language which is designed for the way they want to build apps.
Yeah I do find it super weird that people do this.
An alternative worth considering to Elm is Bucklescript with the bucklescript-tea library. This project gives you a more powerful, but similar language (Ocaml/Reason) with a more direct interop mechanism than Elm ports.
Something (weird) that I noticed in many Scandinavian websites is their short domain names. I don't know the reason, but I like the fact that you can type 5 letters and access the service that you want.
For .no, I reckon it's a combination of small population and the fact that you need to be a citizen to buy one. Until recently, they were only available to organizations. There's also restrictions on the number of registered domains you can have (100 for organizations, 5 for individuals), that limits squatting somewhat.
> A common misconception is that it is risky to use a non-mainstream language, since it will then be difficult to find developers with the right experience. We have found, however, that we don’t need people to know Elm beforehand.
Are there a lot of people who actually want to use Elm tho? Seems like the real risk to me, not finding anyone interested in learning and using Elm.
From the POV of someone hiring, there's a sort of geek-magnet effect that kicks in if you start hiring for something like Elm. You get the kind of people who like learning new things, who would otherwise completely ignore yet another React or Angular dev job listing.
Problem is that also attracts those where new technologies is not a mean but the end goal. So when they start to get productive in the "new technology" (that's now "one year old, ugh") and if the shop ain't up to the task of rewriting everything every year those people move on to the next hype baby . Being a geek-magnet should be a very minor and explicitly stated short-term factor in deciding what tools and technologies to use.
 Yes, this is anecdotal and based on one former colleague!
In my opinion, this is a case where a supplier (IT consultant company: Bekk) uses a non-standard unpopular technology, to implement a technical solution, for a customer who is state owned and has almost monopoly (Vy/Norwegian Railways). I suspect, the reason for this choice, is to lock the vendor in. For the customers of Norwegian railways, the results is a more expensive train journey.
What's your evidence that train journeys have gotten more expensive in Norway due to this?
FWIW i am Danish and almost all of our public IT projects are done in .NET, almost always the reasoning is "more developers, more mainstream, less lock-in". Our IT projects are always hilariously belated and more expensive than budgeted. More often than not the same contractor (one of 5ish big corporations) keeps getting the same contracts from the same departments because they have pre-existing knowledge of the system they previously built (hint: this is lock-in). Now, the last part is changing somewhat due to EU tender rules, which I think Norway also abides by (they are not in EU, but are committed to complying with most EU laws)
The vendor lock-in is a good point... Isn't this risky for the customer? What do they gain over, say, a well-crafted React-TS SSR app, or Django or what have you? Do they really get an end-product that is so much more reliable? Is this cheaper or more efficient? What happens if there is a political fallout between the consultant and the customer, or if the customer can no longer afford them?
I mentioned this in another post. But Vy has their own developers, and the development teams here contains a mix of Vy and Bekk developers. As such, Vy has enough Elm experience to handle any future turnover.
The external consultant developers are incentivized to keep essential knowledge to themselves, in order to get new contracts later. The supplier's IT consultants (Bekk) don't share essential knowledge with the customer's developers (Vy).
It might be that way where you work, but that's definitely not the case here.
In fact, I think what you suggest would be an extremely short-sighted "strategy" for a consultancy. Sure, you might get the next contract working this way. But once the customer could get rid of you they would, and they would never hire you again.
Elm was chosen because we believed it to be a better language than those which are mainstream right now. We believed it would make us more productive, prevent bugs before they reached production, be better at local reasoning and make it easier to onboard new people.
So far we are not dissapointed, and in my opinion Elm is on its way to become mainstream because of these things.
I was frustrated by that as well. In the end, I actually found a solution that was surprisingly easy and works well. I'm about 90% sure it was https://github.com/billstclair/elm-websocket-client, although it's been a few weeks and I can't check right now.