4 ms·
DSL stands for Domain Specific Language. In our story, the DSL is HTML. An internal DSL refers to the host programming language’s ability to express that D
by fao_ 9y ago
DSL stands for Domain Specific Language. In our story, the
DSL is HTML. An internal DSL refers to the host programming
language’s ability to express that DSL using just the host
language (with no string building).
One could argue that Internal DSLs are not really a separate
technique from #2 (Tree Building) and #3 (Templates). In fact,
internal DSLs could be described as a less-crappy tree building
API. Or as a templating language that is more integral to the
host language.
But I think the technique is different enough to deserve it’s own category.
This person is describing Lisp, and I'm flummoxed that they do not appear to be aware of Lisp, given that it is an area where it is so strong! I think both Arc and Closure have the ability to describe HTML documents in lists (I can't remember if it's as s-expressions, or lists of functions).
EDIT: I just noticed that they reference Om :) Never mind!
- ue_ 9y agoI know that Arc uses macros, such as `blankpage` if I remember correctly, which will start you off with a <!doctype html><html> or whatever.
- nibbula 9y agoYes. As a Lisp programmer I've almost forgotten that I should be thankful to be able to say something as simple as: (defun button-bar (name) (let ((i 0)) (with-html-output (*page*) (:div (do-query (button-name) (select [button-name] :from [tools] :where [= [bar] name]) (htm (:button (format nil "~@r. ~a" (incf i) button-name))))))))
- StokeMasterJack 9y agoI do mention lisp (or rather Clojurescript)