2 ms·
Here is an example of a DSL I made in Common Lisp for doing compile-time URL checking in a web application: http://carcaddar.blogspot.com/2008/11/compile-time-i
by sedachv 10y ago
Here is an example of a DSL I made in Common Lisp for doing compile-time URL checking in a web application: http://carcaddar.blogspot.com/2008/11/compile-time-inter-application-uri-link.html http://carcaddar.blogspot.com/2008/11/compile-time-inter-app...
Common Lisp makes it easy to compose DSLs so it was trivial to apply the URL checking DSL to the JavaScript generating DSL (Parenscript) and have the browser-side code checked at compile time as well.
Another good example is CLiki2: https://github.com/vsedach/cliki2/blob/master/src/readtable.lisp https://github.com/vsedach/cliki2/blob/master/src/readtable....
The HTML template system is a small DSL on top of a string interpolation library (vs a 10,000 line templating library that can't even get HTML attributes right). It was also trivial to make it use streams to eliminate string allocation/copying.