POV-Ray : Newsgroups : povray.general : POV-Ray Includes - Standards : Re: POV-Ray Includes - Standards Server Time
1 Aug 2024 00:23:45 EDT (-0400)
  Re: POV-Ray Includes - Standards  
From: nemesis
Date: 5 Dec 2006 18:50:01
Message: <web.4576052647def5ca86cccd0@news.povray.org>
"Charles C" <nomail@nomail> wrote:
> If you want the #declare of a sub-include to have local-status of a
> current-level include, then that seems like it'd work just as long as the
> #declare was meant to be used at a one-up level (one-up from the
> sub-include).  I've got a lot of stuff which I think this system would
> break.  It's seems hard to come up with a system that won't break
> something.

Yes, i can think of a clear example:  global includes which are just meant
to include other files to files including it, like:

/* scene.pov */

#include "main.pov"
....

/* main.inc */

#include "foo.inc"
#include "bar.inc"
....


No big deal.  Just #include them without #as and the original #include
behaviour should be the same.  So:

#include "foo.inc"

makes all declared foo items available to whomever includes the current
file, while:

#include "foo.inc" #as foo

makes declared foo items local to this file and prefixed with the foo alias.

I took the as syntax from the python programming language imports, which are
java's one better. :)

I have a little problem with the "namespace" term:  what does it mean to
someone who's not a programmer?  Anyone can understand "include", not so
with "namespace".  is it edible? :)

What to do?  what to do?  overload #include to handle more meanings?  add
yet more specialized syntax?  The former is C++ way, while the latter is
the Perl way and seeing how POV-Team members are knowledgeable in both, i
can't see what the future reserves... :)

Anyway, nice to see real efforts to bring the SDL a step further in design.
I hope the POV-Team pick some of our best efforts and give it a thought and
a spin.


Post a reply to this message

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