[bind10-dev] config data api
Michal 'vorner' Vaner
michal.vaner at nic.cz
Thu Apr 12 17:09:16 UTC 2012
Hello
It's a rather long email for this time of the day (so I might add some more
comments tomorrow), but:
On Thu, Apr 12, 2012 at 04:38:07PM +0200, Jelte Jansen wrote:
> Currently, we are working mostly with ?raw types? in Python; on disk
> settings and specs are represented in JSON, and these are parsed and
> then used directly. Because a lot of operations depend on the kind of
> data they operate on this has made the additions we have made a bit
> messy, to say the least. On the C++ side we have the Element set of
> classes, which is a little bit better, but can still be improved quite
> a bit.
This sounds you want to replace both the specifications and the actual data with
classes. I find it really user friendly the data itself (parameters to commands,
configs, etc) are the raw python primitives, as they are much easier to handle.
We probably could make the lists iterable and the maps [ ] indexable, etc, but
is there really a need? Or can the dict/list be inherited to add some more
functionality to them?
> So the proposal is to extend the Element classes, and make a similar
> set (perhaps through python/C) for the python side (though i am
> thinking we may want stuff in python we don?t need in c++, on top of
> the basics).
Having a wrapper is better than a separate implementation in case of other
wrappers, or we need a way to convert them.
With regards
--
Anyone who goes to a psychiatrist ought to have his head examined.
-- Samuel Goldwyn
Michal 'vorner' Vaner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <https://lists.isc.org/pipermail/bind10-dev/attachments/20120412/aea6da4e/attachment.bin>
More information about the bind10-dev
mailing list