HACKER Q&A
📣 raydiatian

Engineering VP tells you switch from TypeScript to Elm. Joy?


Imagine this hypothetical. Would you honesty rather work in Elm or Typescript for solving daily problems? Everybody lauds Elm as this end-all FP tool for never having bugs. How much of this is hype, who has done it and has no battle scars, or what are the battle scars? Who is terrified, etc


  👤 PaulHoule Accepted Answer ✓
There are some kinds of code (compilers) where persistent data structures

https://en.wikipedia.org/wiki/Persistent_data_structure

are miraculous. The merits of so-called "functional" programming languages for applications work are hard to separate from the merits of the ecosystem they are embedded in (e.g. is the urlenecode() function correct?) but frequently you hear the engineering manager says something like "we are programming in Scala so we can do error handling with monads and it will be so much better than using exceptions", then when you look at the code you see that nobody is checking for errors and then ask "doesn't the engineering manager say that we do code reviews?"

That is, for a lot of people talking about functional programming seems to be a substitute for doing the job right.


👤 1-more
it's not hype. You get to write off a whole class of problems. You get new problems instead, but they're better ones to deal with. That said: is the VP also an individual contributor? Why is this change happening? That part seems a little odd to me. But I have engineered my career to write elm on the frontend and not another language because there's a whole kind of problem that we don't have anymore.

👤 dave4420
I wouldn’t be happy with a manager mandating a change of language, whatever the change was.

I’m happier working with Elm on the front end that I am with Typescript on the backend though.