Re: GVariant for prez!



Havoc Pennington wrote:
Hi,

On Mon, Apr 13, 2009 at 4:32 PM, Simon McVittie
<simon mcvittie collabora co uk> wrote:
On Mon, 13 Apr 2009 at 15:56:36 -0400, Havoc Pennington wrote:
It looked like you might allow non-string dict keys, was one I noticed.
Er, so does D-Bus... Telepathy uses a{uu} in at least one place.

I personally think D-Bus has about the right balance for what to allow as a
key in a dict (any non-container type, including strings and object paths
but not structs, dicts, arrays and variants).

You're right (git blame says I wrote the bit of spec that says you're
right, and coded it the way you say... now I just have to work on my
memory...)

GVariant is exactly this way too. The type system even explicitly supports this concept with the '?' wildcard: it matches any simple type (ie: no containers). This was done because I wanted to be able to write "a{**}" but that would have been invalid: now you can write "a{?*}" instead to mean "any dictionary entry type".

Cheers


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]