POV-Ray : Newsgroups : povray.general : Warn About Naming Conflicts? : Re: Warn About Naming Conflicts? Server Time
31 Jul 2024 16:32:23 EDT (-0400)
  Re: Warn About Naming Conflicts?  
From: nemesis
Date: 5 Dec 2006 19:10:00
Message: <web.457608a63c5677586cccd0@news.povray.org>
Ben Chambers <ben### [at] pacificwebguycom> wrote:
> OK, as an offshoot from another thread here, perhaps an even simpler
> solution to the problem exists.  What if, everytime you #declare an
> object which has already been #declare'd, the parser gives you a warning
> telling you what was re#declare'd and where?
>
> This would not apply to #local items, only to globals.  It would take
> some work to convert a lot of the current include files, but it would be
> much safer overall.
>
> ...Chambers


file this idea under that thread too, Ben. :)

but then, suppose this works:  people actually look at the warnings if
things go noticeably wrong.  What happens next is that they will have then
to rename some stuff in their own files or, if they are out of luck, in
someone else's file if they include 2 or more files which happen to share
some names but are not related.

This is too much of a problem and a simple alias together with the include
declaration in the first place would not permit that to happen.  Giving a
unique prefix identifier of your own to include files is much better than
having to go through the files renaming stuff.  That and local scoping for
included items should go a long way into making povray SDL a lot more
sturdy and capable for handling large catalogues of objects and textures...


Post a reply to this message

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