4 ms·
Yeah I think HTML is a good exams of a domain spec language. Instead of putting HTML in a dead string it can be in a parsible lisp object can be manipulated wit
by jarjarbinks455 6y ago
Yeah I think HTML is a good exams of a domain spec language. Instead of putting HTML in a dead string it can be in a parsible lisp object can be manipulated with editor commands. Of course you can do the opposite and have HTML file with lisp code embedded. Ie like a jsp in Java. But with lisp all this is at your finger tips. You don't need to wait for a big billionaire company to make html syntax for you. Or unit test supported at the language level. Or whatever
- db48x 6y agoEmbedded SQL is also quite common.
- harperlee 6y agoYes but in my experience (with korma, which I don't like) I've not used a lot of programmatic modification of SQL queries. At the end of the day, I write a query for "a data question", and I add parameters to the question, but it is rare for me that I need to "create new types of questions" on the fly. Even if I need to compose a query for a more flexible questioning than using a value parameters, this is something that typically could be done by combining 2 or 3 substrings, there is not typically the need to work queries as much as I do with HTML and hiccup. So at the end I moved to HugSQL (the modern+popular "write your queries in SQL"-philosophy library) instead of YesQL (the modern+popular "write your queries in clojure"-philosophy library, similar in approach to korma).
- db48x 6y agoYes, sometimes that suffices. Other times you have to translate an ad–hoc query language encoded in the query parameters of a url into SQL queries, and then it would be really nice to have some way of manipulating them other than just string concatenation. That's a month of my life I’ll never get back.
- harperlee 6y agoOk, fair point, you don’t need it until you need it and you wish you had it :)