Информационный сервер для программистов: Исходники со всего света. Паскальные исходники со всего света
  Powered by Поисковый сервер Яndex: Найдется ВСЁ!
На Главную Pascal Форум Информер Страны мира
   Управление Памятью    >>    generic
   
 
 Generic - Usefull Memory Objects   Eric C. Wentz 29.07.1989

Четыре удобных и гибких объекта для организации доступа к памяти с высоким уровнем абстракции: Динамические Массивы, Динамический Стэк, Динамическая Куча.
Four usefull objects: FlexArrays, FlexStacks, MaxArray, GenericHeap.



38k 
 

Eric C. Wentz 1-703-860-3807 {evenings before 11 p.m. Eastern} CompuServe ID: 72070,1015 2374 Antiqua Court Reston, Va. 22091 General Notes on the Included Archives: One of the most important ideas behind OOP is that of code re-useability. One important facet of this concept that seems to be missing in Turbo's OOP extensions is that of Genericity. To produce generally useful, re-usable code, it is important to be able to implement abstract concepts (or datastructures) that are independent of datatype. For example, consider the simple abstract concept of a Stack. The operations needed for a Stack are well known to all programmers. All Stacks implement Push,Pop,Top,Full,Empty and maybe Depth. Genericity gives us a way to define this abstractly, and Inheritance gives us the way to implement useable Stacks, such as IntStacks, RealStacks, RecordStacks etc., with minimal extra coding. In other words, by defining the abstract concept and utilizing it, we can forget about the implementation details and achieve yet another useful layer of abstraction in program design. As the designer of the Eiffel programming language, Dr. Bertrand Meyer argues, the true strengths of OOP will be realized by a Bottom-Up approach to programming design (I can hear the Priests of Top-Down design chanting evil thoughts even now!). By designing and implementing low-level, generally useable Objects, we can avoid constantly reinventing that which has already been adequately designed and implemented elsewhere. The true power of OOP will not be realized until such time as there exists a large body of such Objects from which to draw upon when coding specific applications. The included packages are my (first) contribution to this idea. I give them to the public domain in the hopes that others will also undertake to build such low level, generally