Hacker News new | ask | show | jobs
by mattfenwick 4302 days ago
I don't know what you would like clarified, so please let me know if this doesn't cover it:

IMHO, the OP is presenting a DSL (DSL = domain specific language), and there are at least two common ways to implement DSLs, embedded and external (i.e. not embedded):

from http://en.wikipedia.org/wiki/Domain-specific_language:

     embedded (or internal) domain-specific languages, implemented as libraries
     which exploit the syntax of their host general purpose language or a subset 
     thereof, while adding domain-specific language elements (data types, routines,
     methods, macros etc.)
An example would be with parsers. Parser combinators are usually an embedded DSL. Tools like Lex and YACC are not embedded DSLs (as far as I know).

-----

Disclaimer: both have pros and cons, etc. etc. Interested in the author's motivations, not in debating which way is better, etc. etc.