POV-Ray : Newsgroups : povray.pov4.discussion.general : Next Generation SDL: What's wrong with Lua, JavaScript, ... : Re: Next Generation SDL: What's wrong with Lua, JavaScript, ... Server Time
15 May 2024 12:17:49 EDT (-0400)
  Re: Next Generation SDL: What's wrong with Lua, JavaScript, ...  
From: SharkD
Date: 12 Apr 2009 22:50:06
Message: <49e2a85e@news.povray.org>
clipka wrote:
> So where exactly is there now a "separation"? I only see two different syntaxes
> expressing the very same thing.

What I was trying to say is that objects in the scene tree should just 
have parameters (i.e. data) and no methods. Modifications to the tree 
would be done using methods/functions with global scope.

I think this would be "cleaner", but would be more like procedural 
programming and not like OO programming. I personally think that OO 
programming is too bulky, in that there are loads of "junk" items 
attached to each object and taking up memory that you are likely never 
to use.

> And I'm still waiting for someone to show me a language that provides a useful
> shorthand notation for:
> 
> var MyObject = new Object();
> MyObject.radius = 1;
> MyObject.translation.append([0,0,1]);
> MyObject.add(new Texture(...));
> MyObject.translation.append([0,2,0]);

AFAIK, what you are trying to do doesn't make "sense" according to a 
scripting language. I.e. the scripting language doesn't know that you 
want the latter translation to occur "after" the texture has been added. 
  It doesn't remember/behave differently based on the sequence of your 
commands. Further, this is something I would gladly see scrapped in any 
future SDL.

-Mike


Post a reply to this message

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