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
14 May 2024 23:45:03 EDT (-0400)
  Re: Next Generation SDL: What's wrong with Lua, JavaScript, ...  
From: nemesis
Date: 11 Apr 2009 23:25:00
Message: <web.49e15e4ae7a64ad8bbbb20030@news.povray.org>
SharkD <mik### [at] gmailcom> wrote:
> MessyBlob wrote:
> > "clipka" <nomail@nomail> wrote:
> >> Yuck. We all know this sucks.
> >
> > Doesn't JavaScript have the ability to assign properties to objects as they are
> > being instantiated?, e.g.
> >
> > Sph = new Sphere( {
> >   radius: 1,
> >   position: [0,0,1]
> > } );
> >
> > I'm not sure about assigning 'new objects as properties' within these
> > properties, e.g. creating a new material in the Sphere new object. Can anyone
> > clarify this?
> >
>
> I've never come across this particular syntax. What is more common is to
> do something like this:
>
> Sph = new Sphere();
> Sph.radius = 1;
> Sph.position = [0,0,1];

Yeah, hard getting imperative languages to look like declarative SDL, isn't it?
;)

I know not enough Lua, I only know it's become very popular among embedded
languages, that it's been developed by a brazilian researcher and that he also
teaches Scheme and brought many ideas from it into Lua. :)


Post a reply to this message

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