IMHO this interpretation of nested function calls as "DSL" is connected with the rise of Ruby, and Rex was inspired by Puppet.

The term was originally coined in LISP, where data and code are almost the same.

But Ruby is monopolizing this somehow now and people tend to call any function calls without parens a DSL.

> if there are any advantages to this approach to a configuration file.

It has some advantages like

But this is far from the only possibility to create a DSL, defining a class allowing chained method calls is one of many.

Martin Fowler's book is an interesting read about DSL, though it often shows his origins in statically typed languages.

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

update

*) I couldn't find chromatic's original blog post anymore, but he commented once about the hype.

1. Have you ever programmed in a language other than Ruby? (PHP and HTML don’t count.) If not, it’s a DSL.

2. Is the defining syntactic feature that youÂ’ve cleverly left the parentheses off of a list of function arguments? If so, it’s a DSL.

3. Is the code primarily a list of key-value pairs? Welcome to DSL Town, population you!

5. Have you ever used the phrase "… and it reads just like English!” in seriousness? You’d better get to the hospital; you’re coming down with a case of the DSLs!


In reply to Re: 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.