I don't believe that someone needs to have a solution in order to observe that there is a problem.
The resources available to an individual for creating and reasoning are finite, and as long as one is able to give good reasons why they know that there is a better way, "there is a problem" may still be valuable information.
If it wasn't widely know that Javascript is a problem, then merely observing that it's a problem instead of trying to provide a solution would be useful. But it's a widely known problem and so complaining does nothing useful. Essentially, at this point in the game, complaining is useless rehashing of a beaten horse.
There's a whole world of problems to fix before you even get to the problem of Javascript.
Right now, the world only has 3.5 base browser engines. Those browser developers have no interest in adding a new standard language like Python, even though more people prefer that to Javascript.
So, if you were to develop a new browser language, you need to build a new browser from scratch, and then move a billion people to it.
> Man, python on the server and in the browser. What a world that would be.
If you're going to imagine that as a utopian alternative to JS, be sure to be thorough about it and imagine 1995 Python dominating the browser landscape for years and then the advancement path the language has taken on the server playing out among several browsers. Then come back and tell everybody how much prettier it looks than JS (for bonus points, how much prettier than ES6).
While we're at it, as a general rant... I think it's weird that Python keeps coming up in these conversations.
It's a nice language, it really is. But it's in the same paradigm set and productivity class with JavaScript, Ruby, and Perl (and to a lesser extent, even PHP). The differences between these languages aren't that big and they're largely aesthetic.
If you prefer it, that's fine. If you find its particular set of choices aggregate some nice marginal gains to some additional productivity over the other languages I've listed in this class, I might even think that's a credible argument.
But if you can't get past the sting from JS's warts and learn to be largely as effective in it as you are in Python -- or if you think the real solution moving forward is to turn the entire fleet of supertankers involved in the web for retooling to use a language that's not that different -- I think that you're not thinking about your tools particularly keenly or carefully.
Don't forget about the burden this would have put on python's language designers to take into account the large amounts of already running code in websites. JavaScript was and remains tailor-made for running in browsers, which has allowed it to maintain near-perfect backwards compatibility for its primary use case without killing the language itself. It's probably a good thing that no other language was repurposed for web page scripting, as it would likely have effectively forked that language.
> The differences between these languages aren't that big and they're largely aesthetic.
They are pretty big. At work I work on a Django-backed project that has a very fat JavaScript front-end client, and JavaScript is incredibly painful to work with compared to Python.
It's not merely aesthetics, but JavaScript in the browser is severely lacking in language features that allow it to scale to larger code-bases.
I use Django a lot too, but JavaScript (ES6 specifically) just isn't a big mental shift anymore. I prefer Python syntax, but Python, Ruby, and JavaScript are pretty comparable at this point.
Also JavaScript has a pretty good variety of languages that compile to it. If you like C#/Scala/Swift use TypeScript. If you like Java use Dart. If you like Lisp ClojureScript.
Dart should also feel familiar to people coming from C#. async/await support in Dart was designed by Erik Meijer (who worked on the feature for C#) and iirc he believes it is the Dart implementation is the cleanest implementation yet.
I don't see much similarity between Dart and Java.
I've done many many years Java, then hit Dart and was very impressed.
Since that I have had to do a fair bit of python, php and JavaScript at work. I think if I hadn't seen Dart first I would have quite liked python.
The problem with Dart is that once you've been developing in it for a while it spoils you from liking anything else. I really cringe with python, JS etc autocompleting to a million irrelevant things.
And going back to Java you have the slow dev loop that comes with a compiled language.
At the end of the day I've simply never had a development experience anywhere near as productive and enjoyable as Dart.
Definitely! Though, unit-testing becomes interesting, as `rewire`, `proxyquire` and other ways of changing the dependencies inside your modules when they are `import`-ed breaks.
I also came from a Python (Django, Flask, …) background and had the same issues. Tried CoffeeScript and it helped a little but eventually fell in love with Dart.
Give it a try. I like that it comes with a useful and well designed standard library (like Python).
Thanks. I did try Dart and our team spent a full month giving it our best for our client.
It was a dream to use compared to JS. One show-stopper though: browser support. At the time, IE11 was just released and Dart had issues with IE11. Also, the Dart supported browser window is only the latest 2 versions of a given browser.
This totally killed our Dart prospects, as our target users in our business are generally non-tech savvy and we need to support older browsers like IE8/IE9.
I just prefer it to be honest, I like java script it just isn't as clean and readable as python to my eyes. And while I know nodejs exists I find flask and django to be much better alternatives (for me and the way I code/think).
I'm fairly certain that complaining works, even if it's not constructive. When enough people complain about something over and over, it builds pressure to change. So I say keep complaining folks!
The resources available to an individual for creating and reasoning are finite, and as long as one is able to give good reasons why they know that there is a better way, "there is a problem" may still be valuable information.