|
 |
"Chris R" <car### [at] comcast net> wrote:
> I am going to keep using dictionaries, because I think the syntax is more
> natural to me, and I don't have to keep track of index positions within an
> array. But, is there any practical advantage to using a mixed array over a
> dictionary? Or is it just a matter of personal syntactic taste?
I can't speak for anyone but myself -
For a while, all we had were standard arrays that only accepted a single data
type.
Then Jaap Frank discovered that if you had several arrays of different types,
those could be packaged into a single array, because doing it in that 2-step
process fooled POV-Ray and gave you an array of arrays, even though it was
functionally the same as a mixed array.
Then we got dictionaries, and jr was happy.
The end.
:)
Actually, I often use mixed arrays as a sort of parameter input for macros, so
having a mixed array helps.
Also, for the longest time we didn't have tuple-style variable assignment, and
so passing multiple values out of arrays was problematic. I would (ab)use
vectors for that, or use the array of arrays workaround, but mixed arrays makes
passing a wide variety of results of different data types much easier.
- BW
Post a reply to this message
|
 |