[haiku-commits] Re: haiku: hrev52569 - src/kits/codec headers/os/codec
- From: Dario Casalinuovo <b.vitruvio@xxxxxxxxx>
- To: haiku-commits@xxxxxxxxxxxxx
- Date: Wed, 21 Nov 2018 19:44:02 +0100
On Wed, Nov 21, 2018 at 3:37 PM Dario Casalinuovo <b.vitruvio@xxxxxxxxx>
wrote:
On Wed, Nov 21, 2018 at 3:28 PM Dario Casalinuovo <b.vitruvio@xxxxxxxxx>
wrote:
On Wed, Nov 21, 2018 at 2:56 PM Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
wrote:
Am 21/11/2018 um 13:02 schrieb Barrett17:
* Use string keys. I am still convinced we need BValue.
You mean something like this:
https://git.haiku-os.org/haiku/tree/headers/private/shared/Variant.h
?
However there's a big difference between OpenBinder's SValue and BVariant.
Note that in OpenBinder it's named SValue.
A BValue would be defined recursively as a key value pair, where both the
key and the value are BValues themselves. So, it can be thought of a
mapping (key->value).
It can of course contain a single value, and in that case, it can be
thought as a mapping everything->value. With this recursive definition, it
is possible to always think of it in terms of a map. I leave the
consequences and utility of something like that to the readers. But I think
it's rather obvious how this can be helpful in many ways in the HaikuAPI
(like for example messages) to make it more flexible.
--
Saluti,
Dario
Other related posts: