POV-Ray : Newsgroups : povray.general : Script language speed : Re: Script language speed Server Time
7 Aug 2024 13:18:39 EDT (-0400)
  Re: Script language speed  
From: Redbeard
Date: 8 Nov 2001 01:03:15
Message: <3bea2023@news.povray.org>
"Jon A. Cruz" <jon### [at] geocitiescom> wrote in message
news:3BE9710A.59F6A388@geocities.com...
>
... useful java references snipped
> or
> import org.xml.sax.Parser;
> import org.apache.xerces.parsers.SAXParser;
> ...
> Parser thing = new SAXParser();
>
> And here are the example docs I was just looking at:
> http://xml.apache.org/xerces-j/apiDocs/overview-summary.html
>
> Anyway, I find it more usefull than C++ namespaces where you have a single
> top-level collection of naming shared by the entire world. Among other things,
you
> start to see names decorated with package naming like:
>
> xmlSaxParser thing = new apacheXercesSAXParser();
>
> And don't get the option of short-cutting.
>
Actually, C++ namespaces are more useful than that.  Unfortunately, they are not
wide implemented (properly) yet.  It would be more like[1]:
    namespace apache_Xerces
    {
        class SAXParser ...
    }
    ...
    [other file]
    using apache_Xerces::SAXParser; // SAXParser can be used undecorated.
    using namespace apache_Xerces;  // Imports entire namespace.

I'll agree that Java's approach is probably better.  Namespaces were one of the
more debated issues in the C++ standardization process.  It's not the best, but
it's better than what existed before.

Michael

[1] It's been a while and I'm rusty, so don't take me for 100% correct.  Some of
the using directives may be incorrect.


--
camera{location<8,20>look_at<6,0,4>}light_source{<8,8>rgb 1}difference{union{
#macro M(D,J)#local R=asc(substr(D,J,1))-32;<div(R,10)*2,mod(R,10)>#end#macro
E(D,B,R)prism{-D,4+D,R#local C=1;#while(C<R+1)M(B,C)#local C=C+1;#end}#end E(
0," (2:FPKAD80* U_dZU"18)sphere{2,2}#macro T(N)cylinder{<9,-N,3><9,4+N,3>3-N}
#end T(0)}T(2)E(1"45LNXUK4"8)pigment{rgb x+y/2}}//(c)2001 MDJohnson(Redbeard)


Post a reply to this message

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