I am interested in learning about the benefits of creating a small library, possibly for personal use, which defines several data structures, such as Linked Lists, Trees (Binary, AVL, etc.), Hash lookup tables, etc.
Some of them will be built on top of their own PHP array, since it acts like many of these types, and some potentially will not.
My question is, does it make sense to build any of these classes - especially those that cannot be based on their own array? I am talking about computational practicality here and donβt particularly want to go into the dynamic or typed language argument (Iβm still interested to hear something interesting and relevant in this topic aside).
Is it crazy to build these (possibly more efficient, logical) data structures using classes when we have a C implementation of the base array?
Thanks..
source share