"I’ve been writing web applications for over a decade and it’s utterly shocking how little JavaScript I know"
Well, glad to hear your opinions on something you know shockingly little about!
But it does highlight one thing that I think that people usually miss when they look for javascript alternatives: You still need to be experienced in making web applications. Transpiling from Brainfuck or Idris or whatever doesn't get you away from the fact that you still have to deal with the DOM and you still need to worry about what happens when someone loads this in IE6 on Linux under Wine... cause that's your life now!
> you still need to worry about what happens when someone loads this in IE6 on Linux under Wine
Do you? I work almost exclusively with government clients, who are notoriously slow to adopt anything. An application we are launching soon for external/public use is IE11/Edge only for IE users.
If you are using IE6 on Linux under Wine, you are making a choice to have a broken experience on the internet. Best of luck to you.
> What other modern programming language is so bad that a linter is most recommended for safety sake?
Linters are just tools that emit warnings. In the case of JS, a language with multiple implementations and without a separate compilation step, it's good practice to have warnings be emitted by a dedicated tool. That way, no matter what browser you're testing on, you get the same comprehensive suite of diagnostics.
And this is why I use Dart. Not sure why everyone hates Dart, but after working with Dart for sometime, it makes me happy that I never get to touch JS, directly at least.
The tooling, libraries, in Dart is great. No need for jQuery, or other libraries, just use the language and focus on your product.
WARNING: HYPERBOLIC CLICKBAIT. No substance, no informed critique or examples. The headline leads one to believe that there would be a thoughtful analysis, maybe pointing to some sociological research, that illustrates why javascript has gained so much popularity in recent years. Instead, it is a weak protest.
Once you get over the fact that JS is basically a functional language where everything is given a false veneer of the object-oriented I'm not sure it's really all that bad. (Which isn't to say that it's good or elegant or isn't filled with badly named things.)
That said, I think the idea that full stack JS is somehow driven by designers or front-end people is mistaken.
I'm pretty sure many businesses find the idea of a "one language" stack appealing and figure it means they can hire less expensive employees. Likewise, I imagine quite a few individual developers hear the same thing and conclude that they could build an entire project with less complexity and some amount of code and library reuse between back and front end.
> Once you get over the fact that JS is basically a functional language where everything is given a false veneer of the object-oriented I'm not sure it's really all that bad.
I was going to point this out, too. I haven't written JS in an Object Oriented way in years, and couldn't be happier. Its a beautifully simple language that can do a lot if you approach it right.
For my job I do about 80% of my work in JS. I recognize that it's not a great language as far as design and ergonomics go. I also recognize that I shouldn't take these critiques personally - after all I'm just writing all this JS because someone is paying me to.
Even so, it wears on me to see the regular JS bashing on HN and other sources (even from more senior devs at my company). It makes me feel like a lesser engineer (which I already feel like being relatively inexperienced). And it just seems purposeless to me. Most of the people writing JS are just doing it because it's what we're paid to do. I know most of these critique aren't coming from a place of wanting to belittle JS devs, but that's the only effect I see them having.
> The language is so bad that the use of a linter (such as JSLint or ESLint) is practically mandated for all JavaScript programmers.
Worth noting that many of the "better" programming languages strictly mandate the use of a compiler. In those languages, you don't even have the option of skipping the ahead-of-time code analysis step before running your code.
Of course, regardless of what language you use, if you're a professional software engineer, you probably should be running at least some sort of analysis tool on your code, whether it's a linter or typechecker or full compiler. I think when evaluating whether JavaScript is a "good language", you should evaluate it in the context of the tools that nearly all JS developers use. It certainly has issues, but a lot of the worst problems (e.g. coercion in `==` and accidental global assignment) can be and are checked by any reasonable lint config.
There are two kinds of languages: those people complain about and those nobody uses.
There is a bit of bandwagon effect here, sure but this is more due to the fact that JS is the only solution for the web and that the software development industry in contexts where JavaScript is seeing the most use is treated like an extended CS project instead of an engineering discipline.
That the former is important is because of the ship-first-build-quality-maybe mentality that has a hold of the industry. The latter is in part a reflection of this.
Certainly, but all of these things are nascent or not adopted with sufficient volume to assert a de facto standard. In that sense I think "JS is the 'only' thing available for the front-end" isn't unfair.
As regards the backend, I don't think it's justifiable that anybody would actually choose JavaScript. There are far better, more stable options. The only reasons, as I see it, to choose JS for the backend are to cheap out on developer spend or to follow a fad. "Isomorphic development" falls in the one or both of these. Excellent, highly (Google) scalable products have been produced without that for two decades now. Asserting it is just, in my opinion, a way to mask one or both of the other reasons.
Well, no. And it’s worse, because at least before, we were screwing up small things with X, it was a toy. The thing is, there is a mass psychosis about X and it’s like everybody is pretending that it isn’t awful.
Instead of JS, you could just as well have C or C++ or Java in there. I've been in situations where I was working for the vendor of a language accused of being a toy.
What other modern programming language is so bad that a linter is most recommended for safety sake?
The use of valgrind and the like has become de rigeur for C. Linters and other software checkers have been a best practice across many languages for awhile. Don't get me wrong, I think Javascript is an example of bad language design. But the language is only one factor out of many. If you have a good shop then it matters much less how good or bad your language is. If you have a good shop then you will have coding standards and tools which will run the linter as part of your integration/release process. If you have a good shop, then the more experienced coders can steer the new programmers away from the gotchas and towards the good parts of the language.
As project size, complexity, and age increase, a good shop with the worst language will outperform the worst shop with the best language. In the long term, a great language community with a mediocre language will outperform a great language with a language community riddled with group pathologies. Choice of language is one of those things that gets too much attention, where the experts know that other things actually matter more. (Just like more horsepower vs. better tires, or choice of golf clubs vs. practice time.)
That's an interesting point. Generally, you don't any choice of the natural language community into which you're born. You do have a choice about which programming language you use, but JS does feel like bit of a monoculture on the web...
English has survived over a millenia and multiple attempts to remove it. English is a great language and pound for pound much better than JS will ever be.
Yes, the JavaScript world has gotten quite complex. Yes, there are a lot of different flavors of JS these days. Yes, the language itself has quite a few warts.
Maybe try to realize that there are actual reasons to use it on the server side like isomorphic/universal rendering and code reuse. JS is one of the most accessible programming languages that exists, making it easy to find developers who are familiar with it.
As far as linters go, I don't get the hate. Almost all of the languages the article lists as alternatives recommend the use of linters. Several even have linters built-in.
Take your clickbait somewhere else, and get over your "I don't use JS" superiority complex.
Using JS all over the place is stupid, it feels faddish and cliquey, and that you always have to keep up with the Jones'. I have been moving my career towards the back end, where the culture is a little more mature and stable. Y'all can have your 27000 framework world.
31 comments
[ 4.5 ms ] story [ 79.1 ms ] thread.Net Core is getting there but it's still pretty new compared to the battle-tested Node.js
Well, glad to hear your opinions on something you know shockingly little about!
But it does highlight one thing that I think that people usually miss when they look for javascript alternatives: You still need to be experienced in making web applications. Transpiling from Brainfuck or Idris or whatever doesn't get you away from the fact that you still have to deal with the DOM and you still need to worry about what happens when someone loads this in IE6 on Linux under Wine... cause that's your life now!
Do you? I work almost exclusively with government clients, who are notoriously slow to adopt anything. An application we are launching soon for external/public use is IE11/Edge only for IE users.
If you are using IE6 on Linux under Wine, you are making a choice to have a broken experience on the internet. Best of luck to you.
Linters are just tools that emit warnings. In the case of JS, a language with multiple implementations and without a separate compilation step, it's good practice to have warnings be emitted by a dedicated tool. That way, no matter what browser you're testing on, you get the same comprehensive suite of diagnostics.
Needless to say, lots of languages have warnings.
The tooling, libraries, in Dart is great. No need for jQuery, or other libraries, just use the language and focus on your product.
That said, I think the idea that full stack JS is somehow driven by designers or front-end people is mistaken.
I'm pretty sure many businesses find the idea of a "one language" stack appealing and figure it means they can hire less expensive employees. Likewise, I imagine quite a few individual developers hear the same thing and conclude that they could build an entire project with less complexity and some amount of code and library reuse between back and front end.
I was going to point this out, too. I haven't written JS in an Object Oriented way in years, and couldn't be happier. Its a beautifully simple language that can do a lot if you approach it right.
Even so, it wears on me to see the regular JS bashing on HN and other sources (even from more senior devs at my company). It makes me feel like a lesser engineer (which I already feel like being relatively inexperienced). And it just seems purposeless to me. Most of the people writing JS are just doing it because it's what we're paid to do. I know most of these critique aren't coming from a place of wanting to belittle JS devs, but that's the only effect I see them having.
Worth noting that many of the "better" programming languages strictly mandate the use of a compiler. In those languages, you don't even have the option of skipping the ahead-of-time code analysis step before running your code.
Of course, regardless of what language you use, if you're a professional software engineer, you probably should be running at least some sort of analysis tool on your code, whether it's a linter or typechecker or full compiler. I think when evaluating whether JavaScript is a "good language", you should evaluate it in the context of the tools that nearly all JS developers use. It certainly has issues, but a lot of the worst problems (e.g. coercion in `==` and accidental global assignment) can be and are checked by any reasonable lint config.
There is a bit of bandwagon effect here, sure but this is more due to the fact that JS is the only solution for the web and that the software development industry in contexts where JavaScript is seeing the most use is treated like an extended CS project instead of an engineering discipline.
That the former is important is because of the ship-first-build-quality-maybe mentality that has a hold of the industry. The latter is in part a reflection of this.
So there is no bandwagon effect, I think everyone is just trying to work with the language they are given.
But the fact that there are transpilers (Coffeescript, Typescript, Clojurescript, etc) means that people want to move away or improve JavaScript.
Now that WebAssembly is being worked on is a big relief. We now have options on what language we think would be best for the job.
As regards the backend, I don't think it's justifiable that anybody would actually choose JavaScript. There are far better, more stable options. The only reasons, as I see it, to choose JS for the backend are to cheap out on developer spend or to follow a fad. "Isomorphic development" falls in the one or both of these. Excellent, highly (Google) scalable products have been produced without that for two decades now. Asserting it is just, in my opinion, a way to mask one or both of the other reasons.
Instead of JS, you could just as well have C or C++ or Java in there. I've been in situations where I was working for the vendor of a language accused of being a toy.
What other modern programming language is so bad that a linter is most recommended for safety sake?
The use of valgrind and the like has become de rigeur for C. Linters and other software checkers have been a best practice across many languages for awhile. Don't get me wrong, I think Javascript is an example of bad language design. But the language is only one factor out of many. If you have a good shop then it matters much less how good or bad your language is. If you have a good shop then you will have coding standards and tools which will run the linter as part of your integration/release process. If you have a good shop, then the more experienced coders can steer the new programmers away from the gotchas and towards the good parts of the language.
As project size, complexity, and age increase, a good shop with the worst language will outperform the worst shop with the best language. In the long term, a great language community with a mediocre language will outperform a great language with a language community riddled with group pathologies. Choice of language is one of those things that gets too much attention, where the experts know that other things actually matter more. (Just like more horsepower vs. better tires, or choice of golf clubs vs. practice time.)
In the same way that English-language speakers have been mind-fucked into thinking that English is a great language?
Maybe try to realize that there are actual reasons to use it on the server side like isomorphic/universal rendering and code reuse. JS is one of the most accessible programming languages that exists, making it easy to find developers who are familiar with it.
As far as linters go, I don't get the hate. Almost all of the languages the article lists as alternatives recommend the use of linters. Several even have linters built-in.
Take your clickbait somewhere else, and get over your "I don't use JS" superiority complex.
Using JS all over the place is stupid, it feels faddish and cliquey, and that you always have to keep up with the Jones'. I have been moving my career towards the back end, where the culture is a little more mature and stable. Y'all can have your 27000 framework world.