POV-Ray : Newsgroups : povray.pov4.discussion.general : Next Generation SDL Brainstorming : Re: Next Generation SDL Brainstorming Server Time
1 Jun 2024 06:50:08 EDT (-0400)
  Re: Next Generation SDL Brainstorming  
From: SharkD
Date: 10 Apr 2009 21:36:56
Message: <49dff438$1@news.povray.org>
SharkD wrote:
>  > Similarly, I think a clear distinction between floats and vectors 
> would be good.
> 
> I *strongly* disagree with this point. I think POV's loosely typed 
> nature is an asset, not a curse.
> 
> -Mike

However, a vector is just another type of array that uses a different 
syntax ("<" and ">" instead of "{" and "}"), so there's no real need to 
keep both, technically.

And, I think the current method of declaring arrays/objects is bulky. In 
JavaScript you can use the "literal" form to declare normal arrays like 
this:
	var foo = [bar1, bar2, bar3];

and hash arrays like this:
	var foo = {bar1 : "lala", bar2 : "bebe", bar3 : "dada"};



In Lua it's even simpler. You declare normal arrays like this:
	local foo = {bar1, bar2, bar3}

and hash arrays like this:
	local foo = {bar1 = "lala", bar2 = "bebe", bar3 = "dada"}

Mixed normal and hash arrays require a bit of extra work in Lua, though. 
But, I'll not get into that here.

-Mike


Post a reply to this message

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