Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: the disadvantages of mini-languages

by metaperl (Curate)
on Feb 05, 2005 at 14:03 UTC ( #428320=note: print w/replies, xml ) Need Help??


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

everything you listed is of great use, but I don't consider these mini-languages. They are aspects of a general purpose language with a specific purpose and different syntax.

I have been having problems finding a definition for mini-language, but my personal opinion is that all of the above are not mini-languages.

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

Replies are listed 'Best First'.
Re^3: the disadvantages of mini-languages
by BrentDax (Hermit) on Feb 05, 2005 at 20:44 UTC

    Then you're wrong. Regular expressions at least are a mini-language; they have their own concepts of control flow, which are very different from the surrounding language.

    Mini-languages are useful in places where logical programming--explaining what you want under certain conditions and letting the computer figure out when they happen--is the best way to express your algorithm. make is one example (although it's an extremely limited mini-language); regular expressions ("when you see text like this, give me a true value and put these sections in variables"), style sheets ("when you see nodes that match these criteria, set these properties on them"), and yacc grammars ("when you see this series of tokens, do this") are others.

    I do think that you need to have a more powerful full language to back up the mini-language, though. Regexes have Perl or another language for this purpose; style sheets have Javascript; yacc has C. make's flaw is that it's a little too tuned to the task of compiling and linking code, so it doesn't have a backing language.

    =cut
    --Brent Dax
    There is no sig.

      I agree, except for the part where you say that make doesn't have a backing language. It does. It's called shell.

      Makeshifts last the longest.

        True, but shell is a really nasty backing language. It isn't very well integrated with make, and ultimately it suffers from the same flaw as make--it was designed as a limited tool, in this case for linking programs together, and doesn't give you access to a more powerful language (unless, of course, you use a Perl one-liner or something).

        =cut
        --Brent Dax
        There is no sig.

Re^3: the disadvantages of mini-languages
by Aristotle (Chancellor) on Feb 05, 2005 at 19:34 UTC

    There's nothing that defines a "mini language" as such. It's about as meaningful a term as "scripting language".

    And as far as that's concerned, regular expressions indubitably are a language unto themselves. While it isn't practical in any sense of the word to do so, you can model arbitrarily complex control flow with them (though you need Perl's extensions to the language to model loops).

    Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (6)
As of 2019-10-21 23:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?