POV-Ray : Newsgroups : povray.pov4.discussion.general : POV-Ray 4 SDL: Some concrete proposal : Re: POV-Ray 4 SDL: Some concrete proposal Server Time
3 Dec 2024 22:39:57 EST (-0500)
  Re: POV-Ray 4 SDL: Some concrete proposal  
From: Warp
Date: 13 Apr 2009 16:23:21
Message: <49e39f38@news.povray.org>
clipka <nomail@nomail> wrote:
> SphereCenter = <0,1,0>;

> sphere {
>   center: SphereCenter;
>   radius: 1 as SphereRadius;
>   texture {
>     pigment { color: #<1,0,0> }
>   };
> } as MainSphere;

  I find that rather inconsistent.

  First you use "name = value" to define a vector, but then you use
"value as name" to define an object.

  What's wrong with using "MainSphere = sphere { ... };"? That would make
it consistent and closer to the current SDL. You also save a useless
reserved keyword.

> modify MainSphere {
>   radius: 0.9;
> };

  I'm not sure about that syntax, but IMO it should be at least in addition
to a syntax like:

MainSphere.radius = 0.9;

  The dot syntax is intuitive from many languages (including the current
SDL itself), and can be used as an lvalue and an rvalue, an example of the
latter being:

theRadius = MainSphere.radius;

-- 
                                                          - Warp


Post a reply to this message

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