Let's say that DEF does not instance.
What happens the first time you USE the definition? You instance it.
What happens the second time you USE it? Do you re-instance it or
point to the first instance. Re-instancing is clearly not really optimal
and does make too much sense. If you reserence the first instance, then
you have just entered the world DEF/USE as it appears today.
Although the use of a DEFONLY keyword >>may<< be useful later on when
behaviours are put in that have the capability of altering properties of
object instances in the tree. Then, you may need to actually clone an
object and not just reserence it (when you paint one weel red, you don't want
all wheels to be painted red).
In those cases though, a CLONE keyword would probably be more suitable. You
don't have the problems that Gavin states (with the state of the DEFONLY
nodes that are not USEd):
Gavin said:
> If there are objects that are DEFONLY but never USEd, is there a way of
> reserring to them? Do they appear in the parse tree? If the file is
> immediately written back out, are they written?
So fine. A DEFONLY nodes is useful when you are writing VRML files by hand.
How long do people expect to do that? Tools that export VRML files are
becoming more esadily available.
If you MUST write VRML by hand, well... there is always an option of
convertinga DEFONLY type of file to a DEF/USE type of file. It's much less
ambiguity for the file format not to have DEFONLY.
I know all this has been said before, and I'm not repeating them because
Gavin works in the next building. In fact, I haven't even talked with
Gavin about this issue. After some time of thinkint the way it's done is
not right, it dawned on me that it actually IS better semantics.
Hope this helps the whole discussion.
--george