Hacker News new | ask | show | jobs
by pmarreck 251 days ago
It's that fast because it uses a declarative model and this ends up being very efficient for a variety of use-cases

(I say this speaking from a NixOS laptop; Nix operations are invariably much faster than alternatives, like Docker, assuming you have the technical chops to get them to work)

1 comments

React also uses a declarative model, in fact React might be more declarative because it's still declarative at runtime, whereas Svelte et al. do a lot of static analysis to turn declarative UI into imperative targeted dom updates.
Good point. I guess Svelte then takes advantage of both models; a declarative content change might by default result in a large update but the diff is ultimately the only thing that gets applied imperatively; I'm not sure how else React would do it though since the only natively-declarative browser technology is HTML and CSS; as soon as you touch JS, things start being imperative