DValue is the datatype at the foundation of dconf and of the glib-based dbus bindings that rob and ori are theoretically working on. it will end up being part of libglib (probably for the release before next guadec).
it is named DValue because it used to be named DConfValue.
you can read a little bit about DValue here.
one thing to note is that, unlike GValue, a DValue is actually a value — not a container or a variable. it can only exist as a value with a type and the value can never change. when you create it it has a value and the only way to get rid of that value is to destroy it. also note that it can contain exactly those values that can be sent over dbus. it cannot contain, for example, object references.
the problem is that its name starts with a ‘d’ and everything in glib must start with ‘g’. i would rename it to GValue but i cannot do this for obvious reasons.
i need a name for it that starts with g. this is something that a lot of people have thought about for a long time without coming up with any good name.
all suggestions must start with G, be short (G + 5 chars max) and not conflict with anything currently in glib or gobject. entries will be judged by my personal whim. i will buy the winner a cookie at our next meeting. feel free to list many suggestions but note that most of the obvious ones have already been considered and shot down for some reason or another…
thanks :)
Golly?
Gollum?
Gunk?
Glop?
GDVal?
GBag
GBase
GBin
GBox
GCapsule
GCompact
GContainer
GHolder
GPack
GPurse
GSack
or maybe just go with the obvious synonym for value: GProfit
GAtom
GLuon | gluon (we’ve already got GQuarks, why not?)
GMorph
GPart
GPrim
GThing
GThang (Berkeley DB uses DBTs which stand for Database thangs–they were faced with the same problem and never though of anything better)
The way you describe this type, it gets a value when you construct it, and never changes value. I would name it based on that property:
GConst (pairs nicely with GValue)
GImmut
GFinal
GPure
GRVal (as in “R-value”)
GBind
GBound (though that sounds too much like the “bounds” of a range rather than a binding to a value)
Alternatively, based on its use as a wrapped DBus value:
GParam
GArg
GWrap
GWrapd
GDBus
Alternatively, based on your description of the types of values it can hold:
GPOD (“plain old data”)
GPODT
GData
GD
GV
GInst (for “instance”)
GCopy (which has the advantage of reminding people that it represents a copy when you pass it around, not a reference)
GTyVal == Typed Value
GConf! (it is not in glib/gobject ATM)
GDValue!!!
GDesrt
of course davidz already made the best suggestion: GProfit
Ah I forogt one: GTBag (spoken: G-Tee-Bag)
GConst, as already suggested, makes up a really good name, methinks.
This might sound stupid, but why cann’t you just use/extend GValue? From the docs you linked there seems to be quite some overlap between GValue and DValue.
Immutable value of any type? Such thing is named a constant, so GConst. Maybe GAtom if some other language calls it so?..
Thinking “serializable piece of data” makes me say:
GDatum
It connects good with a “data read from a stream” metaphor which is obviously immutable.
Thizzby
I’m voting for GConst, or at the extreme, GConstValue, as it even more clearly illustrates what it is.
GAtom wouldn’t be bad except we already have GQuark and well, I think the physics guys would start throwing things at us.
GIValue for immutable value.
GAsset (asset: a valuable item that is owned)
genue or genvue, short for “Gnome GENeric ValUE datatype”.
genue has, as a benefit, a geek connotation. According to Wookieepedia, Genue was a BFF-1 bulk freighter used by the Galactic Empire during the Galactic Civil War.