Hacker News new | past | comments | ask | show | jobs | submit login
[flagged] JavaScript Is Bad (ror6ax.wordpress.com)
81 points by randomdudeonhn 56 days ago | hide | past | web | favorite | 98 comments

A certain subset of technical people seems to be unable to understand how it can happen that — what they believe to be — technically inferior solutions can win major market share and become the defacto standard for decades to come.

Don't get me wrong: I am not saying that JavaScript is great, but I am also not satisfied with the status quo of the discussion around it.

I don't really see how this contributes anything to improve the situation. Yes, a prototype was done in 10 days. Yes, the web scene has been vibrant and iterating extremely fast for a long time and that has left marks on the quality of the technology more often than not. But hey, instead of complaining, come up with something that is capable of transforming it to the better!

That's not easy and I suspect it's not solvable by technical means solely. So it's hard. And it's easier to just write blog posts that complain again and again.

> That's not easy and I suspect it's not solvable by technical means solely. So it's hard. And it's easier to just write blog posts that complain again and again.

That would be WebAssembly and its true since it is progressing a bit slowly but thats a good thing. If they get it right you can write JS to WebAssembly thats modern and backwards compatibility wont matter or write Python to WASM, or Rust, Go, C#.... And so on.

Someone mentioned here on HN ages back that WASM will probably be the next stage after SPA frameworks. I think C#'s Blazor project is a strong indicator that what is to come will be pretty damn good and pretty damn powerful.

Granted it will take a while as WASM matures and we make sure to push users towards modern browsers. I think tech like Blazor will even see old tech like ActiveX or Java Applets find their replacements in WASM. Heck we saw the other day a full blown Flash Player Emulator in Rust for WebAssembly. That was quite well done!

The future is in WASM and it will take a bit to get it just right but at least we can work on making sure it is designed properly. Do what Microsoft did: they learned from Javas mistakes and C# became a really good language. Lambdas in Java took forever to be added.

Complaining is recognizing that there is an issue. This article is trying to raise awareness of some issues. It is a start! I do not think that not providing a solution to all (or some) issues invalidates anything that has been said. Having a solution is not a necessity. I may point out flaws in a system, but I do not need to have a solution ready for it, do I? The flaws exist, with or without a solution.

We've been stuck in this for at least a decade now. That is what I am referring to with "I am not satisfied with the status quo of the discussion".

The author of this specific article doesn't even seem to consider that there may be non-technical factors at play that cannot be fixed by coming up with (yet) a better language.

It's the same over and over again, unfortunately.

The discussion never resolves, and will never resolve, because the participants aren't the same people - there's literally a constant influx of new, inexperienced developers facing the same issues in a slightly new context (and hence using new language to describe it).

For another example, just go to Reddit's front page. It's the same trendy questions from young people a decade earlier as well.

You'll know an online community is on the path to dissolution when it can 'resolve' problems for good.

The same applies to HN: I'm sure my point has been made many times before, and will be made many times again here.

Well yes, I agree, I would like to brainstorm potential solutions to the issues at hand, too.

> But hey, instead of complaining, come up with something that is capable of transforming it to the better!

This reminds me of the "submit your own PR if you want this feature so bad" mentality that I see on a fair few open source projects. For most people, this isn't feasible. Creating a new programming language, let alone one that could one-up JavaScript any time soon, would be a difficult task. I think people like to point out the flaws of JavaScript because there isn't really a major alternative, it is the de facto web language.

Please consider a not so deeply technical solution. You can do more than creating yet another programming language. I bet if you did, the next rant would be about your language and its shortcomings. Even a very small constructive contribution to the discussion could be very helpful and have a big impact.

A decade long series of rants doesn't help at all.

> what they believe to be technically inferior solutions

When a lot of programming language research is pseudo science, technical superiority of a programming language becomes almost impossible to judge from CS point of view and yet these are the backgrounds people judging programming languages usually have. So here we are, not even able to have proper discussions concerning programming languages. Maybe things will change in the future now that actual empirical evidence can be gathered from open source code and bug trackers, but so far it doesn't seem to have a significant impact.

The problem is partly "political" in the sense of negotiating industry power (rather than state, community, or interpersonal power), and complaining is part of political communication and deliberation. Consensus is not instant or free.

Isn't the solution on its way with wasm, ie. the ability to run pretty much any other language in the browser at high performance?

They would need direct DOM access, the GC, and polymorphic inline cache for many of the popular dynamically typed scripting languages. Some of them also have pretty hefty stdlibs. I suspect you'll see more Lua, than Python, for example. Or maybe something micropython like?

I believe direct DOM access & GC are on their way. I don't know what a polymorphic inline cache is.

Frankly when you look at the number of megabytes downloaded by a typical web page, having a standard library stored on cdn shared between websites wouldn't be that big of a deal.

I've read it, just another piece with zero substance. So what's the author's point, why is Javascript bad according to him?

- because there is no standard library and a lot of things are left to userland

- because Axios error handling is less than ideal

- because bugs sit long time in public repos unanswered

- because some of the language unusual expression parsing quirk, that I've yet to find in a real program

- because projects like Webpack have tons of funding via open collective, while other important libraries are done on a voluntary basis

I couldn't have put together a more random set of unrelated and largely irrelevant complaints if I tried to.

Typical disconnected comments from the author about JS as usual. Why would they focus on axios error handling and not fetch? Even dredging up some left pad....

People complain about standard libraries in languages that have them. Damned if you do, damned if you don't. Let's just chalk it up to a different way of doing things. I personally don't mind leveraging NPM for packages I need. I make use of utility libraries like lodash-fp or ramda to provide the functionality I want.

Bugs actually have a pretty decent amount of resolution for popular JS libraries. I think this is true for all languages though. Popular libraries get worked on, unpopular ones don't. Cherry picking bugs that the author thinks should be easy to fix isn't doing any service to anyone. Everyone who has worked on a product intended for longevity knows there are a ton of easy bugs that never get fixed because of something called.... priorities.

I've tried to explain my point and provide some examples of how the problem manifests in the ecosystem of the language. While my writing skills may need work, I would not call the post random.

The stuff you pointed out could be said of any language, any ecosystem, couldn't it?

There is always some library that is not that well designed that got more popular than it should, little response from certain Github repos, some less than ideal language feature that is there due to historical reasons, important code maintained on a voluntary basis.

Tell me an ecosystem that does not suffer from any of these problems, and I will show you a language that hardly no one uses (when compared to Javascript).

This stuff is inevitable, it comes with the years, due to backwards compatibility, stuff piles up over time. Javascript has resisted particularly well.

If you don't like Javascript, switch to Typescript for me it's the enterprise language of the future, for doing both backend and frontend development.

I won't start even bigger shitstorm by naming better languages in my opinion. Suffice to say I've never had problems sending headers or getting HTTP status code in any major language, except JS(examples are linked in the post).

I have never had a problem sending headers or getting http status code in JS. requite('http') is your friend in node. XMLHttpRequest is your friend in VanilaJS.

Your beef seems to be with a pile of convenience code added by some other projects.

> I've tried to explain my point and provide some examples of how the problem manifests in the ecosystem of the language. While my writing skills may need work, I would not call the post random.

True. I wouldn't say it is random. It was an interesting read. I do find it interesting that the title is "Javascript is Bad" as opposed to say "Here are some warts you can find in Javascript". My take is that it can't really be entirely bad. If it is then it doesn't really seem to matter. For various reasons (some probably down to chance) JS + HTML + CSS underpin the web in spite of their faults. What that suggests to me is that JS must have some properties that have enabled to dominate the web up to now. I wonder if in reality what matters most is the user experiences delivered to users and the value that derived by the individuals/companies that produce them. In addition the ease with which new devs can get started with the language seems like a big plus. With that mind, in some ways it's possibly irrelevant how nasty the code looks, how many iterations it took to weed out bugs due to the warts, packaging, etc

Rambling, rambling, rambling. There are so many wrong things in this post that I don't know where to start, from the design controversy to packages syntax without talking about the package manager. But other comments will debunk them better than me.

That said, a lot of people say JavaScript is bad. And yet this language is one of the most popular one in the world.

And people never ask themselves: "oh, maybe there is something I did not understand about the language/ecosystem".

> "There are only two kinds of languages: the ones people complain about and the ones nobody uses."


ps: also, it's not the tools that matter, but what you build.

I see that as literally the main point that the author sets out to argue: popularity does not equal quality.

I don't think it's a very controversial idea that JS is popular due to its monopoly status rather than its qualities (whatever we argue them to be).

I find it hard to imagine that JS would have ever been very popular on the backend or on smartphones if it wasn't for the monopoly of the frontend. The fact is, today you can cover many bases with this one language. This is great for businesses where the primary concern is how quickly you can get a new person to sit in someone's seat, so this opens up a lot of jobs. A lot of jobs means a lot of incentive to learn the language, closing the loop.

In short, for many actors on the market, there are many reasons to use JS without having to like JS, or even care about its qualities as a language.

I'm not sure why it's hard to swallow that JS (the cultural phenomenon) has qualities that aren't inherited from JS (the artifact).

I personally hate when developers make fisher price websites with javascript for GUI, when all or almost all of it can be replaced with HTML and some CSS. You know, things my browser can execute with highly optimised machine code.

>things my browser can execute with highly optimized machine code

...this includes JS - every browser includes an engine that does exactly this, in fact.

It’s this lack of understanding of how the language and browsers function that makes these tired arguments particularly infuriating.

My browser contains an engine that transpiles and optimises arbitrary javascript to run faster than native APIs?

>faster than native apis

Of course not. Neither said by me, or your post I quoted. HTML and CSS aren’t any more “native apis” then the JS implementation of the w3c spec anyway either.

> That said, a lot of people say JavaScript is bad. And yet this language is one of the most popular one in the world.

The post is about the fact that just because something is popular, it doesn't necessarily mean it's good. The fact that JavaScript is popular cannot be used as proof that it's a good technology. It had a monopoly of the browser market for decades. If Netscape put COBOL there, everyone would be programming in COBOL today.

Some people never ask themselves "have I actually read what I am criticising?".

Your account is only one hour old, so some advice: learn to accept criticism if you’re going to submit your own blog posts to HN.

In my opinion, it is a pretty lazy criticism if one could call it that. It implies that popularity necessarily implies quality. This is most definitely not the case.

"Rambling, rambling, rambling" part is especially unnecessary. How about quoting parts from the article instead and let us know what you think is wrong? As it is, I cannot imagine what I would reply to this "criticism", besides the fact that it incorrectly implies that popularity necessarily means quality.

His reply is fair however, criticism relies on someone evaluating one's arguments rather than blurbing out a stock reply. There was no engagement there within those critical comments.

Some authors never ask themselves, “Have I actually read what I wrote?”

Your post was rambling, in the sense that you make an assertion but then you complain about things not that related to your assertion. You never even define what you mean by bad. Then you use these reasons as justifications for why it’s “bad”:

A) Left pad exists. Basically, people in JS use packages instead of writing simple things themselves

B) A weird design decision with Axios, a third party library

C) A bug in Axios has been left open for a while

D) The built in map function is weird

E) Babel / Webpack get more money than OpenSSL

Only D is actually about the language itself, and E sort of is in a tertiary way but you never actually explain in any depth what your issue with Babel and Webpack getting funding is or what it means about JavaScript.

I do not believe that popularity equals quality.


> it's not the tools that matter, but what you build. Given this logic we all should be writing in Algol.

my point is complaining about JS does not prevent people to build amazing things with it. When products are great, you do not care about the underlying technologies.

Actually, after years of Django, this is such a pain for me to create a SPA with the same level of quality, that I'm considering stopping web development to learn ML.

So, maybe it does not prevent SOME people, but it's about to prevent me.

What makes you think so? Product may be great in it's main objective but slow as compared to what could have been, ineffective in spending computing resources, unable to scale as much as it otherwise could, insecurely handling data, etc.

I tried C, C++ and Java at university before I trying JavaScript. For me JS was the language that made programming fun and exciting.

Your code didn't have to compile, you just write code and debug it in real time and it ran on both my phone and my computer. For me, the web console felt like magic, playing around with all the quirky APIs the browser offered.

Later, I realized I could buy a domain and then have my js available to anyone who went to my website. It felt like the sky was the limit.

Then we got into hardware, and I realized that I could write js using Johnny5 that ran on my Arduino. Without knowing it, I used Node.JS and that opened the ability to start writing simple backends.

Eventually, I realized my code looked quite bad, nesting callbacks like crazy (which I later learnt was called callback-hell), but at the time, Promises became a thing and without knowing it, I kind of grasped the concept of async functions.

I moved on to creating mobile apps using Phonegap; it was really cool and worked well until you realized that there are slow Android phones to and you had to think about performance.

That lead me to try React Native and all of a sudden I had apps running native UI on both Android and iOS. It also introduced me to Objective-C, Swift and how to deploy native apps.

What I am trying to convey here is that Javascript was fun and exciting early on, I could stack knowledge quite easily and pivot into multiple roles with very low threshold.

Sure, there are many quirks with Javascript but in the end, I'd say it's a part of the language and what makes it fun. Just look at React Hooks. :)

Why was this submission flagged? I really would like to have an explanation. One may disagree with it, it may be controversial, but does this really require it to be flagged? After all, it is getting upvotes! I am not exactly new here but I have no idea what it means for a submission to be flagged or why it should be flagged vs. just not voting it up.

We need to separate two things.

One is that JavaScript is bad. It’s true, but strongly typed languages built on top of JS improve it immensely. Most people today use TypeScript, I used to use Flowtype but the history went the other way, oh well. So that part is being fixed.

The other part is the package management, and the ecosystem, and that’s almost independent on JavaScript the language. And well, the situation there sucks so much that I needed to escape to backend world, since I don’t want to deal with broken webpack plugins anymore.

Don’t get me wrong, it’s also broken in python and golang (my current languages), but people at least ADMIT it’s a problem, and in golang folks try to fix the vendor/ mess with modules. (Python... ugh.)

I wish the npm mess was getting better, but while yarn at least solved some sub-problem, the whole thing doesn’t get better. Back to golang I go, I feel happy here.

(Well unless I have to copy paste Apply for the 30th time.)

Javascript is extremely flexible and unopnionated. It is very easy to write horrible code in it and very hard to write good code. The same goes for assembler. But Javascript is still a nice language to compile to, e.g. from Clojurescript (which is a fantastic and very opinionated language). It can run virtually anywhere and modern Javascript engines start up very fast, making them ideal for stuff like AWS lambda and even CLI tools.

To me, the fact we need another language to compile to it, is just another proof the language is broken

I'd argue that JavaScript was - coincidentally - a lean design. Meaning: minimal MVP, go to market early, grow with consumer demand. Sure, this results in a less intellectually pure programming language, but instead in a rugged workhorse that remains widely accessible. Not sure that's a bad thing.

After reading almost all comments, all of this make me think that your positions on the debate are based on psychological characters. Some people are idealists: as Javascript is in some state, but could have been a lot better if history had been different, they CAN'T be happy, they won't. They need to find THE right tool before working with it (I'm an idealist). Then, you have other kind of people which are more adaptative: they tend to accept the situation "as is", and try to withdraw the maximum of benefits of the language. It's easier for them do deal with the issues because they accepted the situation initially. BTW, I think those people are more happy in their daily life. And last, the negationists: they refuse to accept the truth. Those people rely on wrong things (like trends) to evaluate the quality of the language. For them, if JS is used so much, it MUST be good, even if they're not sure why. They believe world auto-regulate itself with natural selection (like ultraliberal people). Plus, if they start to use it, they don't want to hear it's bad because it would question their choice, and by extension, their intelligence.

If there's something developers like to complain about it is JavaScript and JIRA among other things...

I agree with the overall thesis but do not like the presentation. The world is run by hacks one uglier than the other. Javascript, despite its faults, had some good parts that let it grow to the size it currently is. Yet I do not know do we need more preaching about that JS is outdated and we should move on, I at least have already shifted my focus to a new more productive language (granted TS isn't that big of a jump). JS to me is legacy, and I am expecting it to be slowly phased-out as soon as better alternatives become available in the form of WASM or by compiling to JS.

But JS had a good run and contrary to a lot of folks who keep complaining about it, I appreciate what it gave us in the form of simple package-manager (npm was revolutionary at the time, and yes it has its faults). All the amazing frameworks and libraries people have put time and thought into (React, Vue etc) which may have not always been the most bug-free, but I see the proliferation of libraries as a good thing - JS ecosystem has always been constantly changing. When the barrier for creating libraries has become so low, it accelerates the adoption and propagation of fantastic new tools that constantly evolve. Sure, I would like to have also the reliability of the more mature ecosystems but what can you do?

I think I have dabbled so long in JS that it doesn't bother me that much anymore. I mean, who can keep questioning why houses look like they do or why cars drive in certain side every day? It just is what it is. I'm busy building stuff so it feels like waste of my time to keep ruminating on these things. And well, I do mainly TS now so it's not that bad.

English is bad. JavaScript is bad. US customary measurement system is bad.

And you still have to deal with them all. This site is famously written in something cool that’s not JS (EDIT: I thought wrongly that it was Perl). Oh, what's that `hn.js` in the Sources? And you're back to using JavaScript.

JavaScript may be bad, but you need us JS devs to do what we do. We are vital to the advancement of civilization as long as web browsers relying on JS are an essential platform for human communication.

I recently started writing in Golang--it's great! Really enjoyable. The ecosystem is making me act like a better developer. Golang Is Good.

But JavaScript, that's my job. JavaScript isn't going away. We are making it better. We are making better things with it. So "JavaScript Is Bad" all you want. You're still reliant upon it. It's still essential. It's still going to be the first programming language of many developers, especially the self-taught. JavaScript is eating the world.

JavaScript Is Bad. And I'm a bad, bad man. If you can't beat 'em, join 'em.

NoScript works fine on HN. Works fine on most of the Web, really; you'd be surprised.

To dig a little into your mindset, it sounds like you enjoy being needed and having an important part to play. But you've limited yourself by tying yourself to JS and not embracing a wider understanding of computer science.

JS is a portion of my salaried work as well. But that doesn't make it good. Plenty of salaried work is bad. It's up to us as ethical computer scientists to decide to avoid bad work, including deciding to avoid JS.

At the end of the day, JS still doesn't even have integers. It's just as harmful to you as BASIC was to Dijkstra's students, and the damage done is so extensive that you're unable to notice how much you've been hurt.

The only saving grace is that the ECMAScript steering committee has been infiltrated by capability-security folk and is slowly becoming a capability-aware language. You can't stop this, and you will be converted.

"This site is famously written in Perl."

HN? No. https://en.wikipedia.org/wiki/Arc_(programming_language)

Thanks! Correction attempted!

What is it that you are working on that is vital to the advancement of civilization?

The sad thing is that we all chose to be content with a prototype built in 10 days rather than being patient and taking the time to develop a carefully designed solution. It's only now that it's something we are forced to use and put up with because the work required to develop and switch to something better (or even drop backwards compatibility to actually make javascript better) would be phenomenal.

That’s not reason enough for me to be sad! JavaScript makes me very glad. I’m having a great time with JavaScript!

"This site is famously written in Perl."

I think HN is actually written in ARC, which is a dialect of Lisp?

Javascript is fine. It has first-class functions, a minimal but functional metaobject protocol, lambdas, etc. It is also fast and has familiar syntax to work with. There are many worse programming languages out there. I admire the “everything that is popular is wrong” maxim (it is quite popular), but blaming JS as some sort of ultimate evil is somewhat unsubstantiated.

Boeing 737 MAX is fine. It has good hydraulics, state of the art breaks and a fine wing shape. It also falls from the sky but don't let the naysayers discourage you.

It is exactly because it's so bad (forgiving) and availability (browser) it became popular. Just like many other tech.

Being forgiving and being easy to learn are good things. The internets are littered with the graves of unforgiving and hard to learn languages.

Yes. Unless you have odd, undefined or unexpected behavior.

"how our pluralistic ignorance allowed toy language to first become de-facto language in the browser"

I don't know that Eich had lots of obvious choices. I imagine Lua was still pretty obscure in 95. So the choices were probably tcl and lisp if he wanted something lightweight and dynamically typed.

See https://news.ycombinator.com/item?id=1905155. Anyone who looks at either JS or Lua today or even within the last ten years is not being realistic about what was possible in 1995.

Anyway, "Make It Look Like Java" and the time crunch overrode any thought of using some unsafe/unportable/freely-evolving language implementation.

In other news, HTML is bad, CSS too.

Lua makes JS look positively divine.

Lua is basically the same as JS in this department: A few bad decisions spoils the whole for some people. If you compare lua to js at the same time period they would seem similar in quality to many programmers up until the js renaissance (starting at it's very first in 1999 with ajax and really took off around the early/mid 2010's). If lua had gotten the same attention as JS got it's not hard to see it going the other way around.

JS at least got its act together.

LUA seems to practice answering "How many Microsoft Engineers does it take to change a lightbulb" question with the "None. Microsoft document darkness as the industry standard"


I'm not sure if JS is much better for example:

    const a = []
    const b = ''
    const c = {}
    c[a] = 'a'
    c[b] = 'b'
But my point was more that if lua had been given the same amount of development it would probably have turned out as good, It hasn't, so comparing current day-lua with current day-js does not really work.

> Lua makes JS look positively divine.

Mmm...just had a quick glance at the language reference. Couldn't see anything that would make it inferior to JS. Care to elaborate?

Who needs array length?! That's like, dirty. Write your own by iterating via all elements!

What do you mean you want to be able to get, like, keys of your object?! No one needs that! Write your own by iterating through the elements!

It's a name of a variable! Unless it is an identifier of a field. But we write it the same way. Here we even provide you a doc of this being a "got ya!" We documented it, so it is cool.

Don't even get me started on error stack using pcall() nonsense.

And if you really want to have a good time try figuring out how local variables scope interacts with each other... or with a goto.

I can go on and on and on.

The anemic ecosystem, for one.

This is a classic on Hacker News: Some smug elitist rambling about whatever's currently popular by being super nitpicky because it's not their preferred solution.

How about writing a blog post about what you would use instead of JavaScript and why it's good instead of this? That might even help someone.

I don't disagree with the article. However, I'd also argue that JavaScript is good in that it is the best option for functional programming which has an approachable syntax and jobs available.

I guess what I'm saying is that I'd love to be able to start using a better language that allowed me do functional programming on the job. However, I'd rather keep using JavaScript than use a better language that didn't allow me to use functional programming.

Have you ever used... A functional language? JavaScript has lambdas and functions, but I would hardly call it functional. Having types and immutability and pattern matching are pretty important. Being able to run multithreaded would also be very nice.

With Lodash I also get currying and sort of pattern matching (via conditional execution). To be fair, I probably should have said that I was considering the situation when commonly used libraries are available.

Immutability isn't enforced, but I have all the tools that I need to choose to handle data immutably.

I completely agree with you on types though. I don't know that much about TypeScript, but perhaps it would help?

You definitely have a point that functional programming would be much better in JS if these features were built in and/or enforced. However, the problem is: what's the alternative? Haskell/Clojure/Ocaml jobs aren't exactly common. And at least in terms of Haskell and Ocaml, I've found the syntax to be pretty arcane.

Let's replace javascript with ecmascript6 here. The recent ecmascript specs are really nice for functional programming. Javascript in all its backwards compatible glory doesn't have much niceness in the way of FP.

There was never ever a design board for the Internet we know today. Actually when looking back many things look like ducktapes on ducktapes on the Internet and we can be happy that a whole industry takes care on it so that it will keep working reliable. I also think that Webpack and OpenSSL are two completely different things (it's like comparing apples with oranges)

Nowadays you either deal with JavaScript one way or the other or stay away from the browser entirely. Deal with it.

Btw. I also think that JavaScript has many flaws which are based on history... but from a practical point of view I don't have time to reinvent the Internet or time get too much bothered by it ;)

Where do you get the info that OpenSSL only gets 100k $ a year? I see 2 exceptional sponsors, and 5 Platinum sponsors. That comes down to at least 400k $ a year. This is not including other donations they receive.

The word "popular" can mean widely used or widely liked. I think popular in the case of javascript is more the former but people often imply the latter. By usage, death and taxes are popular too!

Unfortunately, I keep hearing from many developers that JS is popular and therefore cannot be "that bad". Which it is, in spades.

I would very much love to read a prequel article that defines "bad". I define a "good" programming language and framework as having as many of the following properties:

* It can quickly solve a problem, e.g., build a webapp that uploads cat pictures.

* It is here to stay, i.e., my investment in using and learning that tool won't be subject to hyperinflation.

* It has a good enough base, i.e., I can quickly recruit someone to scale-up my problem solving.

According to my definition JS is good, or, at the very least, is good in 2019.

It really depends on the type of problem. In many cases, C was really great to use to quickly solve a problem. It is here to stay, and has a good enough base.

We seem to a agree. C is also good (according to my definition) to solve problems in the area of system tooling. I tend to see programming languages as DSLs for a specific problem domain. C has become the DSL of software that lies close to the hardware, whereas JS has become the DSL of webapps.

Yes, I agree. I do not stick to one "ultimate" programming language. I pick one (or two!) based on the problem at hand. I once used FastCGI + C because it made more sense and was quick to implement. :D

So build a better browser with a better language and devs can adopt it. Put up or shut up. You know what's almost as old and quickly written as JS? Complaints about JS.

can anyone tell me why he says that the axios snippet is wrong?

You catch an error to proceed with the expected behaviour, for one.

Why use anonymous functions for control flow? Nearly any other language would either return an error or throw an exception.

Presumably because a rEaL pRoGrAmMiNg LaNgUaGe would have used different exception types to provide the same levels of distinction which still results in basically the same if/else-if/else (or try/catch/catch) structure but "more civilised".

Or because he thinks web apps don't care about whether the server couldn't be reached and whether the server rejected a request. Your guess is as good as mine.

That makes a lot more sense than my assumption (based on his next paragraph) that he just didn’t like chained ‘if’ statements. His mention of “nested ifs” threw me off tremendously, considering that code block doesn’t contain any nested ifs (chained if/else is not the same as nested ifs).

because nested ifs, I think.

Idk where he was going with that, I think he either doesn’t know what nested means or he was referencing different codez

i don't see nested ifs? from what i can tell, it checks whether the error happened in the request or in the response from the server.

but TypeScript is great, so JavaScript is not so bad?

Hammers are Bad. Look at all the modern tools which are build with sophistication, and look at hammers, and everyone is using hammers.

Citing the Wat talk in 2019? That’s about as tacky as JNCO jeans

So the bazaar always wins, hmm

This piece reads like the author didn't even bother to read over it once before posting it. All over the place. Are there no standards here for things to be upvoted? This is pretty bad writing.

"javascript is bad" == upvotes because it resonates with so many people

Does it matter?

It's just the largest, not the greatest, job creation scheme since the building of the egyptian pyramids.

So churn we all...

Hail the Powers of Babylon!


Mmm, what?

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact