Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What are your thoughts on Reason, Elm, and Purescript? #4

Closed
lucidsif opened this issue Feb 13, 2018 · 1 comment
Closed

What are your thoughts on Reason, Elm, and Purescript? #4

lucidsif opened this issue Feb 13, 2018 · 1 comment

Comments

@lucidsif
Copy link

lucidsif commented Feb 13, 2018

One company I spoke with is moving from JS to Reason. When do you think it would make sense to move to one of these languages or just use one of these languages from the get-go? Although I'm aware at least some (maybe all) of these can be used on the backend, where do you see the future of frontend languages (5-10 years from now)?

@swyxio
Copy link
Owner

swyxio commented Feb 14, 2018

I think they make sense, but are mainly going to gain traction first in the big tech firms because they can afford the devs to "play" with less mature tech. if you are the first to find an edge case in Reason, you have to be able to dive into the Reason compiler to fix your own problem, or you're in trouble.

There are 2 big trends here. Companies are investing in building more frontend software which means they want a lot of the same language features they can get on the backend, on the frontend. The big 2 are types (trade off small unit tests for the costs of specifying types up front) and real functional programming (so that async and side effects are well handled instead of mashed up like in JS. this is why they can promise "no runtime errors" because they are fully statically analyzable and move all error catching to compile time). Making a breaking change to Javascript is out of the question so it makes sense to go for a higher level language that compiles down to JS.

The reason that Typescript doesn't do this well is because it is a leaky abstraction. I have been doing typescript at work for 3 weeks and there are always issues with typing idiomatic javascript that is not valid typescript. because of the post-ES6 TC39, javascript is moving faster than typescript. this breaks the promise that "typescript is a superset of javascript".

Flow is less intrusive but still has the problems of not being purely functional so it simply cannot offer the nice DX that Elm provides.

So if TS and Flow are out, that just leaves Reason and Elm. Elm has a larger community but Reason has the backing of Facebook. The next few years will suck for Elm because I think Reason will win. but who really knows. Facebook has failed to popularize tech before (eg Relay)

I don't know anything about purescript.

bottom line: showing you can code is going to outlast the choice of any particular language. if the company needs you enough you can learn the language for the job. the abstractions and mental models don't change. the basic decentralized protocols of the internet will not change. so I would just focus on that. I will say that it did take me longer to learn FP and people are generally always impressed that I have learned Haskell. So it might be worth spending some free time going over one of the FP languages just to see how remarkably different it is :)

@swyxio swyxio closed this as completed Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants