Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re^3: the disadvantages of mini-languages

by BrentDax (Hermit)
on Feb 05, 2005 at 20:44 UTC ( [id://428372]=note: print w/replies, xml ) Need Help??

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

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.

--Brent Dax
There is no sig.

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

Replies are listed 'Best First'.
Re^4: the disadvantages of mini-languages
by Aristotle (Chancellor) on Feb 05, 2005 at 20:57 UTC

    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).

      --Brent Dax
      There is no sig.

        (unless, of course, you use a Perl one-liner or something)

        Q.E.D.? :-)

        Did I mention I find make extraordinarily useful for many tasks besides building compiled software? Almost the only time I will rewrite Perl scripts is to translate them to Makefiles.

        Makeshifts last the longest.

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-05-18 04:42 GMT
Find Nodes?
    Voting Booth?

    No recent polls found