Live data from Hacker News

State of JavaScript 2021

2021.stateofjs.com

191–200 of 245 posts

Re: State of JavaScript 2021

#191
post #136

"Popularity contest" describes the front-end community in a nutshell. I've been in software development since before the web was a big deal. Never have I seen any language have more "high school popularity" style personalities hawking whatever the "best" library is... without any knowledge or wisdom. Any attempt to point out why some of these technologies or approaches are a "bad idea" leads to massive downvote train…

Well, if developers would approach their task with knowledge and wisdom, then the abomination that is Node.js would never have been unleashed on the developer community. But here we are: "yay, Google has written a blazingly fast JS engine, so now we can use JS in the backend!" - never once stopping to question if this is really a good idea...

Server-side JS is an exceedingly useful tool for certain use cases. Specifically, sharing server and client logic. I know everyone here likes to hate on JS frameworks, but the productivity of being able to build one thing in one language instead of the same thing twice in two languages is hard to overstate.

Sure, that has some trade offs like page bloat. But almost all of the JS framework universe is focused now on reducing or eliminating those trade offs: partial hydration, build time code elimination, server components, etc. There’s still a long way to go before the DX and UX reach parity, but it’s inevitable, and closer than one might think (see Qwik[1]).

1: https://github.com/BuilderIO/qwik

Re: State of JavaScript 2021

#192
post #171

Earlier quoted context omitted.

What do you mean? Vue has slots which is similar to render props. https://vuejs.org/guide/components/slots.html#scoped-slots

After a read, I guess it does. A developer I respected claimed it was not easy to pass components down like this. Now I no longer respect him. Also, I still don't respect vue. Look at this abomination {{ text }} {{ count }}

You can respect that developers you respect are humans who make mistakes and misunderstand things. As you've done, you've made an inaccurate claim and learned from it. Hopefully you still respect yourself.

Also (and I'm not familiar with Vue to know if this is the case), the state of software is such that you can make a claim and have it invalidated a few days later after an update comes out.

Re: State of JavaScript 2021

#193
post #126

As a react guy for 5 years solidjs was the only one which piqued my interest. I feel it has all the benefits of reactjs plus more.

Why create a throwaway to write this?

Not the OP but personally I have switched away from having a main HN account towards constantly creating new throwaways. HN does not let you delete your old comments & that's not acceptable to me for privacy reasons.

Re: State of JavaScript 2021

#194
post #178

Earlier quoted context omitted.

> JS and TS brought so much happiness to me for years. But I found it extremely difficult to constantly have to "decide" between X and Y. At least for me it was never a decision once I found TS, TS always got chosen. My spicy opinion in the JS space is that Typescript is better in every single way over Javascript, it is a superior language. Typescript IMO should be merged into Javascript, how anyone develops with jus…

TS has a lot of DNA from the failed ES4 attempt. I think we need something quite a bit more radical than Typescript. We have "use strict" and I think we need to add "use types" too. In that mode, we need to disallow the more dynamic parts of JS. They add TONS of typing headaches resulting in poorly-typed projects and they hurt performance too. This could allow for a much more simple type system and allow a path forwa…

Couldn't agree more. I want to see a "mostly pure" occurence type system with refinement types and HKTs on a SUBSET of ECMA.

Re: State of JavaScript 2021

#195

Spent one hour to wade through all these results, here are my take away: 1. stay with Typescript 2. embrace vite, pnpm 3. keep using eslint and prettier 4. svelte is below React but *above* vue now! what a momentum. I'm going to checkout svelte one more time and see where it is better than vue.

What advantages does pnpm have over yarn? I'm all on board with npm being problematic due to the security-design, but does pnpm solve that weakness better than yarn or provide other killer features? PS - No testing framework in your list. Any reason?

In comparison to yarn 1, my experience of pnpm is basically that it's even quicker (because it's mainly just linking), and significantly more intuitive. My mental model of the node modules directory is that it's all of the direct dependencies of my project, with each of those dependencies having its dependencies in nested node modules directories. Practically, that's not true any more because of deduping, which does solve a lot of problems, but makes that mental model a lot more complex.

In pnpm, though, it just works like that, but without most of the problems because, rather than a deep nested directory structure, it's just your direct dependencies symlinked from a truly flat store into the right places, with their dependencies symlinked again from the same shared store.

I haven't tried yarn 2 as much yet, which I think is a similar attempt to solve the problems inherent to node modules, just in a more complex way. My intuition and initial experiences are that it feels more brittle than pnpm, which already has some problems if a dependency relies too much on the deduped structure that npm provides.

Re: State of JavaScript 2021

#196

Earlier quoted context omitted.

It's always driven by hype, or maybe groupthink. Every year I feel bad for the Ember contributors when this thing comes out cuz the respondents boldly claim Ember's bad while also admitting they've never used it and have no interest trying it. The clear mark of a popularity contest.

Do they say Ember is bad, or that they just haven't used it and have no interest in trying it?

They provide a 2d grid for positive/negative sentiment crossed with have/not used. So there's a quadrant of negative sentiment + have not used that Ember dominates the corner of! It's a weird set of beliefs to hold - hating an unknown - and even weirder to care enough to fill out that part of the survey.

Re: State of JavaScript 2021

#197
post #161
post #154

Earlier quoted context omitted.

> The JS community has devolved into bunch of people who re-invent everything in 2-3 year cycles. Devolved? I honestly thought it had always been this way, going all the way back to the jQuery / MooTools / YUI / Dojo days.

People were pretty supportive of each other for a long time. The community was a somewhat tighter-knit group of people just enjoying seeing what could be done with Javascript. Nowadays everything is so enterprise and formalized (see Typescript), and if you don't do X thing exactly in Y way, you're unemployable and non-"standard" (even though the "standard" changes every 6 months). On jQuery, it hasn't really been re-…

Thanks for the clarification!

Re: State of JavaScript 2021

#198
post #136

"Popularity contest" describes the front-end community in a nutshell. I've been in software development since before the web was a big deal. Never have I seen any language have more "high school popularity" style personalities hawking whatever the "best" library is... without any knowledge or wisdom. Any attempt to point out why some of these technologies or approaches are a "bad idea" leads to massive downvote train…

Well, if developers would approach their task with knowledge and wisdom, then the abomination that is Node.js would never have been unleashed on the developer community. But here we are: "yay, Google has written a blazingly fast JS engine, so now we can use JS in the backend!" - never once stopping to question if this is really a good idea...

I think it was a brilliant idea. I don't know any ecosystem where I can be as productive as with Node.js+Typescript+React. Having everything typed from frontend to backend, even the email templates (tsx + ReactDOMServer) makes refactoring a breeze and work across the entire project.

Re: State of JavaScript 2021

#199
post #136

"Popularity contest" describes the front-end community in a nutshell. I've been in software development since before the web was a big deal. Never have I seen any language have more "high school popularity" style personalities hawking whatever the "best" library is... without any knowledge or wisdom. Any attempt to point out why some of these technologies or approaches are a "bad idea" leads to massive downvote train…

Well, if developers would approach their task with knowledge and wisdom, then the abomination that is Node.js would never have been unleashed on the developer community. But here we are: "yay, Google has written a blazingly fast JS engine, so now we can use JS in the backend!" - never once stopping to question if this is really a good idea...

I don't know, maybe I'm dumber than I think I am, but I've been building software for 10+ years with a lot of different tools in a lot of different environments and I really like Node. Like with all tools, it depends on the use case and the players, but I've used it with great success for BE web services (yes, at scale), CLI tools, and automation. Some of the worst and some of the best code I've ever read has been JS. It requires discipline, but that doesn't make it inherently bad.

Re: State of JavaScript 2021

#200
post #183
post #168

There seems to be a bit of animosity towards front-end development based on the comments. Particularly due to the constant change of the environment and what's perceived as the best option. But, there haven't been calls for solutions. There's points to backend technologies not changing much. My thoughts are because the backend just doesn't matter as much. Backends are mostly I/O streams placed and interacted with on…

>"There seems to be a bit of animosity towards front-end development" On desktop we have nice mature solutions that are powerful and easy to use. Comparatively browser based front ends are a never ending mess in a state of constant swings.

Aren't desktop solutions typically vendor locked?
Post reply on HN