Monday, July 27, 2015

CABOOSE Aside: Actionable Data Structures - Stacks, Queues, Maps, etc.

Team. This posting is simply a side note in the CABOOSE pages about a concept which might benefit its development. For those of us who were computing majors and studied data structures, we learned about various abstract data types such as Stacks, Queues, Trees, HashTables, and etc. It might have been a few semesters later when we discovered the dynamic invocation behavior available in most high-level languages. With this span between learning these concepts, it would be highly unlikely that one would consider combining them unless one was regularly working on projects which used both.

    Traditionally, abstract data types (ADTs) held data only and had rules for creating, reading, updating, and deleting the values within them. These ADTs were an extension of the primitive types found in high-level languages such as integers and floating-point numbers of various sizes plus characters. Being the precursor of modern objects, they represented a grouping of state and related behaviors; however, their purpose was storing state and providing methods for the creation, reading, updating, and deletion of this same state based upon the the rules of their interface. Early ADTs might store individual primitive types or a grouping of such types in a "record of data". When objects became available, they were the entities stored in these structures, such as Queues. Yet, presently, most of the implementations of these common data structures do not support the dynamic invocation of the methods contained within the objects that they store upon pop, dequeue, get, or etc. An interesting class of modern data types would be the actionable data structure. Upon the pop, dequeue, get, visit, or etc. of the object stored within the structure, the atomic action of a specified method would occur. There might also be value in associating behavior with the "insert" operations of these data structures. The dynamic behavior of these actionable data structures also might be toggle-able.  

Just a note before the sheep start flying overhead. Enjoy this upcoming week.
Hunt.... Peck... Think.....

The CABOOSE Team.

No comments:

Post a Comment