I suspect the reason many Perl enthusiasts do not agree is that they have never written a language-powered DSL in an appropriate situation. If the most vocal Perl users (and their leadership, too?) is lambasting the idea, they certainly have no small social obstacle to get around if they honestly think the language-powered DSL is the right way to go.
Cosine Jeremiah, Why Use a Language-Powered Domain Specific Language?
I'm lambasting the idea that, because Ruby lets you slap colons on the front of words and call methods without wrapping their arguments in parenthesis, you're somehow the Mayor For Life of Deeesselltown. Woo. Party time.
Honestly, I can't tell what the difference is between an API (How old school, you crotchety old Perl programmers are still writing APIs? I bet you ride your dinosaur to school uphill both ways in the snow, don't you GRAMPA!) and a DSL (Ruby will buy you a hoverbike. Ruby loves you. Ruby makes its own gravy.), except that maybe somehow string-eval is the magic pixie dust that require or use (Gah! How '90s! Totally tubular old dude!) or do (WTF?! I don't see code blocks anywhere! LOLLERS lrn 2 program!!) isn't.
So, yeah, if you could explain precisely what a DSL is, maybe I could understand it. (As a programmer, I write and use APIs all day, and they look pretty dang similar, except that I don't use string-eval.)
I think you had a brilliant chance to talk about maintainability, the use of ubiquitous language, domain driven design, simplicity, and usability of interface, but instead you grabbed for the new bright and shiny. (Perhaps I'm just a dinosaur, but Aristotle isn't convinced either, and he's smart.)
DSLs: Language or Dialect (Score:1)
Re: (Score:1)
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.
Re: (Score:1)
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:
Re: (Score:1)
> 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
Re: (Score:1)
It's as much a DSL as any other API where you leave off parentheses. In my book, that's a "no".
Re: (Score:1)
Almost: it’s not Ruby.
Re: (Score:1)
Re: (Score:1)
Obfuscated…?
Re: (Score:1)