|
|
clipka <ano### [at] anonymousorg> wrote:
> You indeed seem to be a bit out of touch with development ;)
Very much so. ;)
> As of recently, an official experimental branch exists that supports
> more advanced data containers:
Sweet! Is this in UberPov in any form yet?
> The branch adds a `dictionary` container type, which is essentially a
> string-indexed variable-type array. As syntactic sugar, it also supports
> dot-identifier notation:
>
> #declare Foo = dictionary;
> #declare Foo["Go Figure"] = 47;
> #declare Foo.Fnord = sphere { <0,0,0>, 2 };
Oh nice!
> For giggles, the branch also adds support for a new flavour of
> one-dimensional integer-indexed array that can grow dynamically as needed.
Thats cool, does it have Queue type push/pop operation?
Those sorts of structures would be nice to have, just the standard run if
the mill ones at the least.
> Another for-giggles extension allowing to mix data of different types in
> one and the same array (both fixed and dynamic size) also already exists
> in one of my drawers.
That sounds like a tuple array.
> More detailed information on the currently implemented syntax can be
> found somewhere on these neswgroups, probably posted mid-september.
I will look for it.
> The next step would be to introduce some syntax to assign macros to
> arbitrary (i.e. non-global) variables, ideally without actually
> duplicating the macro; that would effectively turn the dictionary type
> into a mechanism for object-oriented programming (using duck-typing).
That also is a great idea.
Being able to define a class or other named container laid out the same way
(properties, constructor and such) would be nice too though but probably a
huge pain, otherwise I would guess it would already exist, which I guess is
why the dictionary is setup the way it is.
Before I read your comment I was seriously considering making an SDL I/O
macro for handling JSON, just so I could make class like structures in a
known language, but that is not needed I guess now unless it would be very
helpful to have.
Ian
Post a reply to this message
|
|