6 ms·
The languages usually don't have great support for doing it any other way. So people often do it the same way they would've done it in the mid-1990s (as string
by neilv 3y ago
The languages usually don't have great support for doing it any other way. So people often do it the same way they would've done it in the mid-1990s (as strings, only in Perl CGI scripts).
Racket (and most other Lisps) have built-in syntax transformation features that will let you do it as your own macros, or even inlining with different parsers, without some distinct preprocessor kludge.
Here's a macro example: https://www.neilvandyke.org/racket/html-template/ https://www.neilvandyke.org/racket/html-template/
Here's doing it with data: https://www.neilvandyke.org/racket/html-writing/ https://www.neilvandyke.org/racket/html-writing/
You could also make a Racket reader so that you could have inline HTML in its customary angle-bracket syntax.
- davidw 3y agoIf you have a lisp program that generates HTML, now your 'HTML person' can no longer easily work on it with familiar tools.
- neilv 3y agoWith Lisps, you can also make it work with external HTML files (or HTML template files), for that person. In my case, I'm usually more productive doing HTML in my main programming language code, which is why I wrote those particular libraries.