
Our Use of Haskell and Elm - blackRust
https://www.sanityinc.com/articles/why-we-use-haskell-and-elm/
======
tchaffee
What I liked about this article is that rather than being a complete sales
pitch it mentions the cons about adopting a language that is not used at mass
scale. The biggest one being the ability to find and hire talent. They get
around this challenge by being willing to train, which is reasonable. And
refreshing to not see that real challenge swept under the carpet.

~~~
borge
I've always thought that hiring i.e. haskell developers would be easier than
for more widely used languages like java and python as I've assumed that the
talent-to-jobs ratio would be a lot higher. I actually have no idea though.

------
salimmadjd
Learning ELM really helped me learn Haskell which is something I'm continuing
to do, but Elm helped a lot. So I can see why a Haskell shop would want to use
Elm for their frontend work. This makes total sense.

That said, my initial enthusiasm for using Elm, aside from a gateway-drug to
Haskell, has waned. I just do not have enough confidence in adopting Elm for
our internal project nor to recommend it to other companies.

The last release of Elm was 1 year and 8 months ago. The new release is
purported to break many things. However, this new release is unknown, it's
really unknown when it's going to be released and aside from a few insiders
and contributors no one else seem to know what to expect.

Elm applies some interesting principles (type safety, purity, etc.) that helps
to reason about your code. But, it's direction is driven by one person. That
in itself is not bad, however, there is very little communication coming out
of him (the last blog update by him was 1.5 years ago). Because of that, I
started looking at Reason and what FB and others are doing.

I think it makes no sense to invest months or years into something like Elm at
this point and any advantages Elm might have had initially, is coming to
parity with other solutions.

I still think if you want to get your hands dirty with functional programming,
play around with Elm. The Pragmatic Studio Elm lesson is great starting point.
But look elsewhere for any serious projects.

~~~
Skinney
Why does it matter when the next release is coming, as long as the project is
actively maintained?

~~~
salimmadjd
That's a valid point. In this case, two reasons:

1 - active development is relevant. Is it being updated once a year, once a
month. Is it going to take 1 year, 2 or 3 years.

2 - Above is not a deal breaker along. But, the new release is going to break
stuff. you need to have ability to plan around things, especially as the new
release will have paradigm shift (from what I'm gathering). You don't want to
write lines and lines of code, then needing to rewrite it all.

I think what makes it even more unreliable, is lack of any communications. I
think part of the problem is, Evan (the creator) probably is still not sure
what this future looks like. He is very articulate, but not seeing any blog
post update makes a reasonable person assume that this new release has not
been fully conceived. So, everyone knows there will be a break change. But who
knows what will break, when it will be released, etc.

On top of that, this new update has become a gatekeeper for bunch of pull
requests and bugs on the existing system that is not being touched.

The people who sit next to Evan the author of Elm in Action and the biggest
users of Elm (Richard Feldman) has pushed back the release of his book by one
year. Basically the remaining part of his book, is all the SPA stuff that the
version of Elm is supposed deal with. From what I've seen, it seems like even
he doesn't know what to expect [0]

Put everything I mentioned together, it makes it hard to recommend Elm for
anything your company will be depending on, especially when there are other
solutions out there. Why take the risk.

[0] [https://www.manning.com/books/elm-in-
action](https://www.manning.com/books/elm-in-action)

~~~
leshow
I bought that book 2 years ago, I've since stopped using Elm. It's pretty bad
that it still hasn't been released yet.

------
Arubis
I’m confused by the discussion of bringing new programmers on a team up to
speed with these lesser-used languages; this blog is quite explicitly from a
one-man dev shop.

~~~
pyrale
We do the same in several teams of 5+ people, in a company having 3k
employees.

I don't understand what lets you come to your conclusion.

~~~
latexr
On the “About this site”, on the right, it says:

> Hi, I'm Steve Purcell - Sanity, Inc. is my one-man consultancy and software
> house.

------
deathtrader666
Check out Miso [1] a frontend framework built in Haskell.

[1] - [https://haskell-miso.org/](https://haskell-miso.org/)

~~~
frou_dh
I look at the opening stanza of the first example:

[https://github.com/dmjio/miso/blob/master/examples/todo-
mvc/...](https://github.com/dmjio/miso/blob/master/examples/todo-mvc/Main.hs)

"We're not in Kansas anymore"

~~~
Tarean
RecordWildCards and DeriveGeneric are clearly used but fairly basic.
OverloadedStrings seems to be used for MisoString.

The other extensions don't seem to be used so it probably isn't as bad as it
looks.

------
platz
So, what does HN think of PureScript these days?

~~~
christophilus
Can't speak for HN, but I really liked tinkering with it. If I remember
correctly, its data structures were just basic JS data structures under the
hood (e.g. JS arrays, objects, etc), which meant it didn't show the same perf
benefits of a language that uses persistent data structures under the hood
(e.g. Clojure, OCaml/Reason). I wonder if that has changed since I took a
look.

~~~
platz
Cool you liked it - I recently had a similar experience replacing from JQuery
froms with it.

It does by default it provide access to native JS data structures, but you
don't have to use them e.g. there are persistent structures as well.
[https://pursuit.purescript.org/packages/purescript-
ordered-c...](https://pursuit.purescript.org/packages/purescript-ordered-
collections/1.0.0) though I don't quite understand the comment that persistent
data structures are "slower" than native structures; I thought usually, it's
the other way around.

------
specializeded
They mention plentiful motivated job applications, how is the market from the
perspective of a developer looking to focus on Haskell?

~~~
paidleaf
> They mention plentiful motivated job applications

I'd take anything from an advocacy article with a grain of salt.

> how is the market from the perspective of a developer looking to focus on
> Haskell?

Considering the only response you got points you to a subreddit, I'm guessing
it isn't so great. At best, it is a niche market ( though that could be
lucrative ).

I wouldn't put all my eggs in one basket. I'd make sure you have some
expertise in Java, C#, C++, Python, etc ( don't forget SQL ) where there is a
large established market that isn't going anywhere soon. But even more
important, get experience in specific technologies ( databases , web servers,
IDEs, version control, etc ).

~~~
danharaj
> Considering the only response you got points you to a subreddit

Funnily enough, a job posting was made on r/haskell since that comment was
posted. It's not a bad space to watch for jobs.

~~~
tome
And another one ...

------
xfer
Why are they not using ghcjs? Wouldn't that work nicely with their existing
infrastucture and codebase?

~~~
Tehnix
GHCJS is a beast to bring in, and brings lots of complications with it. The
build tools and environment around it is also not great, and most development
tools that work for GHC break down for GHCJS.

That's not to say it can't be used, in fact a lot do quite successfully, but
it is a BIG increase in complexity.

I'm more hopeful for approaches such as WebGHC[0] or perhaps more promising,
Tweags Asterius[1] :)

[0] [https://webghc.github.io/roadmap](https://webghc.github.io/roadmap)

[1] [https://github.com/tweag/asterius](https://github.com/tweag/asterius)

------
pushpankar
> "Haskell has excellent libraries for integrating with databases and web
> services, and for building API services."

I tried using Haskell for my side project(group chat type). Its libraries are
nowhere near matured ones like Phoenix.

~~~
pyrale
What libraries did you use, and which problems did you encounter ?

