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 11:11:11 EDT (-0400)
  Re: Next Generation SDL: What's wrong with Lua, JavaScript, ...  
From: SharkD
Date: 11 Apr 2009 22:14:15
Message: <49e14e77$1@news.povray.org>
clipka wrote:
> Hmm... at first glance I thought it could do the desired thing - but it can't.
> How, for instance, would the following translate?
> 
> sphere { <x,y,z>, r
>     translate <a,b,c>
>     pigment { ... }
>     translate <d,e,f>
> }
> 
> Filing both translate statements as "translate" in the hash map would overwrite
> the first of them. Just combining the two would fail to properly affect the
> pigment.

True, but in this case maybe it's better to force the user to substitute 
a better solution? I.e.:

	scene.objects.MySphere.translation += <d,e,f>


>> Alternately, we could differentiate
>> the content and behavior by using separate sections and languages for
>> each (i.e. HTML and JavaScript in web pages).
> 
> Yuck. We see that in the current SDL. It can be quite powerful, but it's not
> really the way to go.

While having XML *and* a scripting language might be yucky, I think that 
using separate conventions for content and behavior is a *good idea*. 
And, hash arrays are good in this regard.

I don't think using functions (i.e. keywords followed by parentheses) 
for everything is the way to go.

-Mike


Post a reply to this message

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