POV-Ray : Newsgroups : povray.general : Who Not Make Naming Conflicts Disappear? : Re: Who Not Make Naming Conflicts Disappear? Server Time
31 Jul 2024 16:28:41 EDT (-0400)
  Re: Who Not Make Naming Conflicts Disappear?  
From: Sabrina Kilian
Date: 6 Dec 2006 18:43:30
Message: <457755a2@news.povray.org>
Randall Sawyer wrote:
> nemesis - Thank you for your prompt response.
> 
> From: nemesis
>> Sounds a lot like prefixing each declare in the include with a unique
>> identifier, perhaps chosen by us. ;)
> 
> Actually, I saw the prefixing as extra work for the author.  I thought it
> could be avoided.
> 

Why extra work for the author? If the library/include is prefixed, the
author of any given scene doesn't need to prefix their work. It would be
extra work for the library maintainers, however. A simple perl script
should be able to locate any variables #declared in separate files. I
don't know perl too well, but I'll see if I can cook up something anyways.

> From: nemesis
>>> I cannot use names used in B1.inc or used in B2.inc.
>> You could use them freely if they were local to the files including them. ;)
> 
> That's the whole point: Have the names declared in an include be local ONLY
> to the file that '#include'd it.
> 

If you mean local in the same sense as the #local command, what happens
with collection includes like stones and shapes.inc? Making the user
include each subfile just to have access to it seems like a good way to
increase parse time and annoy the user.

>> this discussion should probably be better off under the Standards thread...
> 
> Our topics under that thread have evolved.  Ben Chambers set up camp at
> "Warn About Naming Conflicts?"  I set up this post because I feel that my
> idea is divergent enough from the original discussion, that it meritted its
> own position.  Besides, I was getting no response at the previous site.
> 
> I have no attachment as to the outcome of these discussions.  I would like
> to see a solution that makes the POV-Ray experience as enjoyable for
> everyone as possible.  And, I would like to increase my understanding of
> namespace management.
> 
> -Randall
> 
> 
> 
> 

This isn't really limited to the library project but POV in general.
Let's see where the conversation leads.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.