|
|
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
|
|