I wouldn't call eLisp a DSL. True, it has a bunch of domain specific commands but is still a GPL (General Purpose Language).

That's pretty much like with JS which has DOM specific commands but can still be used for other stuff (actually eLisp was the role model for all those embedded scripting languages° - Brendan Eich was originally hired by Netscape to create a Scheme like language)

The best example for an (external) DSL is SQL. It is limited to a specialized domain, e.g. you will rarely see computer games realized entirely in SQL.

But if you are an SQL expert you can contribute to Perl, Python or PHP projects, without knowing much of the host language.

The case of this thread - Rex - is a configuration DSL realized "internally", i.e. by reusing language elements of the "host language" Perl. (SQL snippets are external strings)

You don't need to know much Perl to be able to use this DSL.(pretty much like SQL-expert can patch SQL code in a Perl project)

The advantage to JSON:

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

°) I only mentioned LISP because DSL's where invented there, especially with the use of reader macros* which bend the parser by overriding single symbols. For instance you can make LISP parse embedded JSON

*) not to be confused with LISP's syntactic macros or even C's preprocessor macros.


In reply to Re^4: Is use of a simple DSL for a configuration a good idea? by LanX
in thread Is use of a simple DSL for a configuration a good idea? by nysus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.