Hey,

    Currently working on the Binary Tree implementations for the ADT
    extension and was wondering what people thought as more intuitive,
    something like:

    $tree = tree_new(AVL_TREE);
    tree_insert($tree, $element, "compare_func");
    // ...

    Or:

    $tree = avl_tree_new();
    avl_tree_insert($tree, $element, "compare_func");

    Basically the difference between a generalized tree api, where you
    pass a constant to the constructor (if you allow me to use that term
    :), or where every form of the tree has a different set of functions
    (currently planned are Red-black tree's, AVL tree's, Simple Binary
    Search Tree's and Btree's).

    Thoughts?  I'm currently leaning towards the first one...

    -Sterling


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to