News for hackers. Stuff that matters.
Re:Virtual DOM is pure overhead (2018) by brylie on Sunday May 19, 2019 @07:15AM (#19952719)
The "separate files" argument is a red herring. It is really about separate "mindsets" or "modes of thinking".

In effect, JavaScript logic tends to be procedural/imperative, while templates allow declarative semantics, and styles are nearly a 2.5D constraint language. "Separation of concerns" here means only having to think in a particular mode, rather than blending all of those modes of thought into a single eyespan.

Notably, Vue allows for single-file components, while preserving the familiar and intentionally designed separation of declarative (HTML), imperative (JavaScript), and aesthetic (CSS) code.

Re:Virtual DOM is pure overhead (2018) by JMTQp8lwXL on Monday May 20, 2019 @06:44PM (#19966033)
I don't see how separate files forces you to think differently. It might aid in that effort, but it likely doesn't force it.