POV-Ray : Newsgroups : povray.beta-test : I have a hunch some of you may like this... : Re: I have a hunch some of you may like this... Server Time
29 Apr 2024 18:52:24 EDT (-0400)
  Re: I have a hunch some of you may like this...  
From: Christian Froeschlin
Date: 28 Sep 2016 17:03:38
Message: <57ec302a$1@news.povray.org>
Nice feature!

Regarding syntax I would recommend not to get carried away
with multiple variants and syntactic sugar, it all has to be
maintained, is source of potential parser bugs, causes confusion
reading code of other people when there is no "right way" (TM).
And someday it might be rewritten completely and it all has to
be backward compatible etc...

So it might be preferrably to define only one "POV" syntax
for single item access and one for initializer list.

Personally I prefer quotes around key like dict["foo"] = 42 to
keep a distinction between identifiers and values. Although I may
be biased towards strictly typed languages, and in scripting a
distinction between structs and dictionaries is less needed.

For the initializer list I must say the mathematician in me
dies when I see something like "Foo" = 42 :)

On the other hand I quite like the perl option "Foo" => 42
which seems to intuitively define some sort of mapping.


Post a reply to this message

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