Hacker News new | ask | show | jobs
by mvanaltvorst 1817 days ago
You could also say Python is pure overhead. You can write any Python programme in C, but more efficiently! C is faster, and therefore better.

This article avoids the fact that declarative programming has proven to be more pleasant for most people. And React simply is fast enough for most use cases, even though it has a performance penalty compared to Svelte. The virtual DOM is an elegant optimisation that usually works well in the real world, and methods like `shouldComponentUpdate()` can be used in the 1% of cases where the default is not fast enough.

2 comments

> This article avoids the fact that declarative programming has proven to be more pleasant for most people.

No it doesn't. Second-to-last paragraph:

"It's important to understand that virtual DOM isn't a feature. It's a means to an end, the end being declarative, state-driven UI development. Virtual DOM is valuable because it allows you to build apps without thinking about state transitions, with performance that is generally good enough. That means less buggy code, and more time spent on creative tasks instead of tedious ones."

You're right! Seems like I skimmed over that part. My point still stands, though.
Ease of use is definitely important - but 9/10 programmers not familiar with either Svelte or React, learning either for the first time, would prefer Svelte.

There's many good reasons to use React - mainly the React ecosystem - but simplicity is not one of them.

This article is specifically attacking a claim that I have heard before - that React is fast, because it works on virtual DOM, therefore it is faster than real DOM operations.

I have heard that claim myself before.