Thursday, February 09, 2012

Relaxation

Talking with someone about GNU make passes - first evaluating the dependency graph, and then building it..

.SECONDEXPANSION http://www.gnu.org/software/make/manual/make.html#Secondary-Expansion - a kluge, IMHO.  Although it may be good enough.

One of my friends got annoyed enough by passes that he wrote his own build tool. (Hi, Mark!)

Suggested relaxation - basically, keep passing over, until changes stop happening.

Observation: in a language like Perl or Make, with sigils like $var, each pass might strip a sigil.  1st pass $VAR, second $$VAR, third $$$$VAR, etc.  Ugly!  I hate counting backquotes.

Languages that use unadorned variable names look prettier.

But are they any more or less likely to have infinite relaxation cycles?  Probably no more.

--

How does this relate to my desire to set a bit in text to say "Never parse this?"  Not much.  Or, rather, that may be the key to reducing user errors with relaxation. Set the bit, and never substitute no more.

--

Hey, maybe this is the key: there are two types of text, syntactic text - into which substitutions may be done - and non-syntactic, terminal, finalized text.

If you arrive at terminal text you are done, done, done.

Syntactic text may continue, or may stop relaxing when there are no more changes.

Most languages make terminal text harder to express - quoted string.

I've worked with languages that make syntactic text harder and uglier - e.g. Algol W with 'IF' 'ELSE' quoted keywords.

Key is notations that allow us to go from easy syntactic / ugly terminal text, through ugly syntactic / unquoted, easy, terminal text.  Points in the middle...

No comments:

Post a Comment