3 ms·
This is probably one of the major things that Clojure gets right (ignoring EAVT databases) that no one copies You don't need a CSS preprocessor if you can mani
by slifin 7y ago
This is probably one of the major things that Clojure gets right (ignoring EAVT databases) that no one copies
You don't need a CSS preprocessor if you can manipulate your CSS using the standard data manipulators in your given language, this applies to so many DSL languages like HTML, CSS, SQL, Clojure has Hiccup, Gardern and HoneySQL respectively
Here's a PHP SQL port I've been working on https://github.com/slifin/moonlight https://github.com/slifin/moonlight (keywords removed for ergonomics but it did lose power when I did that)
If a third party gives you a stringy language to work with you gain power back by creating a data representation, operating on that then converting it back to string at the execution point
In the case of PHP we took the Java route and put everything into objects: https://github.com/zendframework/zend-db https://github.com/zendframework/zend-db, the amount of code required to do that is almost comical when compared, Zend DB also suffers from a lot of bugs/lack of features compared to honeySQL which is about 5 files of data orientated code: https://github.com/jkk/honeysql https://github.com/jkk/honeysql
I should mention Zend DB is not an outlier here for bulky code have a look at other PHP query builders they're all impenetrable