NULL Variants?

Nate Nielsen nielsen-list at memberwebs.com
Wed Aug 31 09:55:17 PDT 2005


Nate Nielsen wrote:
> Havoc Pennington wrote:
> 
>>>Nate Nielsen wrote:
>>>
>>>>When sending a DBUS variant across the wire, is there a way to specify a
>>>>NULL/None/Missing value? I'm using the GLib bindings. I've tried various
>>>>things and gotten crashes and big bad warnings.
>>
>>We used to have one and deleted it on purpose, I don't remember the full
>>reason why but it's probably in the list archives.
> 
> 
> And so off I went searching various archives, and found this:
> 
> 
>>The NIL type:
>>
>>  NIL doesn't make a hell of a lot of sense as a *type*, really it's a 
>>  value that's allowed in *some* languages to replace a value of any
>>  type. I think we need to get rid of DBUS_TYPE_NIL since I can't make 
>>  any sense out of it.
> 
> 
> I agree that DBUS_TYPE_NILL doesn't makes less sense as a type. It makes
> much more sense when used inside a variant. This is similar to how
> DBUS_TYPE_DICT_ENTRY doesn't make much sense outside of an array.
> 
> That said, while reading through that thread in the list archives I
> didn't find a solution. Any ideas? I need to represent missing values in
> a variant (similar to SQL NULLs).

I could be really daft, but I don't see the reasoning of why having
Variant NULLs is evil, or inappropriate.

If this really is missing, and there's no replacement, then I'd like to
implement it (even though I have no experience hacking DBUS).

Havoc, John, Colin, any reasons this change wouldn't be accepted? Sorry
for all the CC's, just interested in a semi-definitive answer.

Cheers,
Nate



More information about the dbus mailing list