3 ms·
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 procedur
by brylie 7y ago
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.
- JMTQp8lwXL 7y agoI don't see how separate files forces you to think differently. It might aid in that effort, but it likely doesn't force it.