Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re^2: the disadvantages of mini-languages

by hardburn (Abbot)
on Feb 07, 2005 at 14:28 UTC ( #428672=note: print w/replies, xml ) Need Help??

in reply to Re: the disadvantages of mini-languages
in thread the disadvantages of mini-languages

The point of a mini domain-specific lanugage is to make a single task really, really easy. You almost certainly have a host language, but you're choosing not to use that because it doesn't make that single task really, really easy.

Imagine if, every time you wanted to parse text, you had to build your own Finite State Machine, node-by-node. You could hardly get any work done. Fortunately, Perl provides a regular expression domain-specific langauge that builds the FSM for you.

Would replacing regexen with Tcl help? No, not at all. Deal with it :)

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.

  • Comment on Re^2: the disadvantages of mini-languages

Replies are listed 'Best First'.
Re^3: the disadvantages of mini-languages
by aufflick (Deacon) on Feb 10, 2005 at 06:38 UTC
    Regular expressions are a GOOD example of where domain-specific languages are beneficial.

    A turing complete is a domain-specific language gone BAD.

    Apache rewrite rules, for example, use regular expressions - that is good. They could have invented their own language to match urls - that would have been bad.

    Should I have added "or SQL or regular expressions" to the last sentance of my original comment?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://428672]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2019-10-23 23:43 GMT
Find Nodes?
    Voting Booth?