A little side note; You could consider ClojureScript.
I've worked with JavaScript many times through the years, and never felt that I got close to becoming an expert no matter what. The language it self is in the way. Browser compatibility, language weirdness (like the =, == or === mess) and there are a lot of standards around. But now a days working with ClojureScript, which settles the language problems, I get to focus on getting good at libraries, react and browser-stuff.
I hope I never have to work with vanilla JavaScript again, but since ClojureScript is a niche I'm pretty sure this dream will burst at some point. But I can attest ClojureScript has brought significantly more enjoyment into my life when dealing with front-end development.
Unfortunately, when one is seeking to learn JavaScript, you will encounter all variations of:
+ Use Typescript (no, it's not the same as JS)
+ Use ClojureScript
+ Use Elm
+ Use Reason
+ Use ...
If you go back about five years, you'll find this pattern also exists, except all the things people were saying to use are dead. Dead like a forgotten Egyptian pharaoh - buried and never to be seen again.
Unfortunately, all the code bases written in these poor JS-likes are still alive and I and many other poor souls still have to maintain the dang things.
You know what's still alive? Javascript. You know what still basically works the same? Javascript. You know what codebases from five or seven years ago I don't mind maintaining as much? Javascript.
JavaScript is still alive not because it's worthy of being alive (compared to the four other languages you mentioned), but because it was first and became well entrenched. COBOL is still alive too...
ClojureScript and Reason are superior languages, period. They will live long happy lives, too.
Oddly enough, being a superior language isn't the same thing as being a language anyone actually wants to use. There's a reason Python and JS are some of the most popular languages in the world despite "superior languages" existing.
I suspect that most of the ones I name will join the bone pile of the many other "superior languages" or continue to be used at most by a niche few.
something else will come along that's even more superior, and the tooling surrounding your once-superior codebases will bitrot as the community jumps onto the next passing ship and you're caught holding the bag.
I get your point. However I recently encountered 5 year old javascript and it was horrible. Full out jQuery and the (function(export){})(arg) pattern. And lots of dead test in some some long gone test library. But your point is valid if it were CoffeeScript and jQuery. That would be even worse for sure.
There is no relief in sight and it'll suck for a long time because everything is very fluid everywhere. Legacy will suck.
But if you want to be as productive and confident as you can these days; my take it is to not engange in vanilla JavaScript.
It really feels that with typescript it may be finally different. Deno, the new version of Node, will speak typescript natively; and the adoption and satisfaction rates for typescript are over the roof. Coffeescript or clojurescript don't even come close.
There was a time when you couldn't get a job with Linux, and you couldn't convince a company to try Linux. So you snuck it in, and in some cases the company never knew (partly because it was so much more reliable than other options that it didn't crash nor reboot).
Sneak ClojureScript in. I know of one shop that trained its JavaScript engineers to use ClojureScript in two weeks. Quite frankly, if one is smart enough to write actual good, safe JavaScript, then one can definitely grok ClojureScript.
I would go for it. As you say, it will be a valuable learning experience. And writing anything the second time (even if switching languages) tends to be much easier than the first time since the problem is more known. So you lose not much time if you ultimately throw ClojureScript away in favor of something else.
Linux did not win the server space because admins snuck it in. It won because it was free and worked well enough compared to signing up for tens of thousands of dollars worth of lengthy contracts with SCO/HP/IBM or even Microsoft.
> Sneak ClojureScript in
I don't see this ending well.
It's great to do your side projects in your favorite language but foisting it onto your employer so they they are forced to use it is a pretty bad violation of trust.
What happens if you quit and ClojureScript programmers are hard to find at the price the employer can afford without going out of business?
Linux won because it got proven to be effective before any money had to be spent. The risk of trying it out was very low. And it ran well on old or low spec hardware, which Windows did not run (well) on. So we snuck Linux in by installing it on old puny PCs, setup some useful network services, and let it do its job well for months. Then we would casually mention to management what we did.
Many companies would not or because of SLAs _could not_ use free Linux. They would pay RedHat or Suse fees that included support/maintenance. Yes, it was still usually cheaper than Window licenses, but the price was not really the point.
Now about sneaking languages, platforms, and stacks in... Java was once too risky and unknown to be used in place of C/C++, but we snuck that in and proved it was up to task. Python... hah, Python was a toy "scripting language". No self-respecting CIO would approve of building company products in Python. Ruby? Rails? Surely not, those were also free, unknown, unproven technologies (which ironically were trying to supplant Java-based systems... that same Java which was once too risky).
PosgreSQL or MySQL? No way, that's not reliable for production. Of course it is, and it got snuck into companies whose engineers despised Oracle and SQL Server (not because MSSQL sucked, but because it only ran on Windows).
You can pick any modern best of breed tool, and I can point in history when that tool had to be snuck in to prove itself and gain acceptance.
I feel the same. I do full-time ClojureScript - at least a few jobs exist! If you would like a job doing ClojureScript, email me at the address in my bio.
ClojureScript is Clojure. Which eventually keeps me in the JVM universe where I'm experienced and familiar with tools, libraries, devops and everything around the development environment.
So as a Java developer ClojureScript keeps me a little in a familiar realm instead of jumping to a whole new ecosystem where I have to pick up every new aspect in the tool chain, including the language.
But this is personal, and I have absolutely no experience in these other languages you mention and they may be awesome.
I've worked with JavaScript many times through the years, and never felt that I got close to becoming an expert no matter what. The language it self is in the way. Browser compatibility, language weirdness (like the =, == or === mess) and there are a lot of standards around. But now a days working with ClojureScript, which settles the language problems, I get to focus on getting good at libraries, react and browser-stuff.
I hope I never have to work with vanilla JavaScript again, but since ClojureScript is a niche I'm pretty sure this dream will burst at some point. But I can attest ClojureScript has brought significantly more enjoyment into my life when dealing with front-end development.