4 ms·
>Do we really need to turn the styling system into yet another Turing-complete scripting language? There's a really big difference between a Turing complete pr
by mistercow 13y ago
>Do we really need to turn the styling system into yet another Turing-complete scripting language?
There's a really big difference between a Turing complete preprocessor and a Turing complete styling system.
There are clear advantages to having the client receive styling information in a non-Turing complete format, the major ones being performance and avoiding non-halting programs. A Turing complete preprocessed language does not remove those advantages, because preprocessing happens only once.
In fact, I would argue that it increases those advantages. As you mentioned, we already have JavaScript, which can be (and often is) used to manipulate styles. If you want to avoid a Turing complete styling system, then you want a Turing complete preprocessor. Better to have the arbitrarily complex program running once on the server side via SASS, than to have it running in the browser on every page load, via JavaScript.