Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • In some ways, this debate is like the one over the difference between languages and dialects with human languages. I would say that something that determines a domain-specific language vs a dialest is having a separate existence. Is the DSL defined separately from the parent language? Could it be parsed by another parser without the complete interpreter for the parent language? Or is just a convention and API to represent the domain? A good example is JSON. JSON started out as JavaScript, but was specifically chosen as a limited subset. Simple and useful enough that people have written parsers in other language. People are even working on a JavaScript parser so they don't need to write use eval().
    • That’s an amalgamation of the point made by Piers Cawley [bofh.org.uk] and some by Ovid [perl.org].

      I think this is a discussion with lots of distinctions without a difference. It’s like we’re trying to define what pornography is.

    • Or is just a convention and API to represent the domain?

      Obviously it can't be that, or you could write DSLs in Perl, which Cosine suggested is impossible.

      My main objection is that the whole mad-foaming rush to drool over three little letters so overshadows much more interesting discussions, such as:

      • To what degree do general purpose programming language design issues affect expressibility?
      • To what degree does the expressibility of your programming language affect the robustness and ease of produci
      • > "You have access to the full syntax and semantics of the
        > host language as an escape hatch; why not take advantage of that?"

        One of the nicer things about Module::Install (lets ignore the whole fundament disagreement over the concept for a moment) is the nice little DSL (\o/ yay \o/) it uses, and the fact you CAN mix the regular language in with it.

        use inc::Module::Install;

        name 'foo';
        all_from 'lib/foo.pm';
        requires 'Bar' => 1.01;
        build_requires 'Test::More' => 0.42;

        if ( $ENV
        • Does this meet the criteria for a DSL?

          $ perl -MO=Deparse is_it_a_dsl.pl
          use inc::Module::Install;
          name('foo');
          all_from('lib/foo.pm');
          requires('Bar', 1.01);
          build_requires('Test::More', 0.42);
          if ($ENV{'AUTOMATED_TESTING'}) {
              build_requires('Test::Pod');
          }
          WriteAll();
          - syntax OK

          It's as much a DSL as any other API where you leave off parentheses. In my book, that's a "no".

        • Almost: it’s not Ruby.

        • To the extend that omitting all the parentheses and pointy bits makes it just an obfuscated form of perl, no.

          • Obfuscated…?

            • Well sure. Anytime you go taking parentheses and pointy bits off function and method calls you introduce ambiguity about what the invocant is, what the method or function name is and what its parameters are.