From kragen@dnaco.net Tue Aug 25 08:32:42 1998
Date: Tue, 25 Aug 1998 08:32:41 -0400 (EDT)
From: Kragen <kragen@dnaco.net>
To: fractint@lists.xmission.com
Subject: Re: (fractint) Formula inclusion - discussion
In-Reply-To: <SIMEON.9808250920.A@hartley-l4k.sul.soton.ac.uk>
Message-ID: <Pine.SUN.3.96.980825082607.11646H-100000@picard.dnaco.net>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Keywords:
X-UID: 1394
Status: O
X-Status: 

On Tue, 25 Aug 1998, Nigel H. J. Long wrote:
> This proposal makes good sense to me in its concept. My 
> main concern is how this will work 'in the wild'. What 
> happens if two formula fragments accidentally have the same 
> name?

Well, perhaps we could incorporate the author's name into the
fragment's name somehow?

author Nigel Long {
	fragment bnts {
		IF xyz
			z = z + 1
		ELSE
			z = z * 2 - 1
		ENDIF
	}
}

formula bob {
	. . . .; some stuff
	Nigel Long's bnts
}

This would avoid most name collisions.  And the syntax "[a-zA-Z0-9 ]+'s
[a-zA-Z0-9]+" should be clear enough (although someone might think it
was supposed to be a comment!)

> Every time you have code making a jump to another file you 
> increase the risk of it making the wrong jump. Is there any 
> way that the chances of error can be reduced? I cannot see 
> any simple way of verifying that the fragment read is the 
> correct one. 

The above might help a little bit.  At least it would keep people from
accidentally naming their formulas into each other.

C++, Perl, and Ada use namespaces of different sorts to do this.

Kragen

-- 
<kragen@pobox.com>       Kragen Sitaker     <http://www.pobox.com/~kragen/>
We are forming cells within a global brain and we are excited that we might
start to think collectively.  What becomes of us still hangs crucially on
how we think individually.  -- Tim Berners-Lee, inventor of the Web


