libtree
libtree copied to clipboard
Make core API work with integers only
All core API functions accept two types to reference a node in the database: NodeData and integer.
Because the database doesn't understand our types :-) this means every function has to type check and convert passed NodeData objects into integers. This adds overhead, makes the code harder to read and possibly introduces type bugs.
Because we now have the wrapper objects, this convenience feature has become obsolete. I think it's a good idea to make all functions work with integers only and remove the possibility to pass in NodeData objects.
I agree.