Abstract
The purpose of the research is to develop a conceptual model of an object oriented system and implement it using a functional language with metaprogramming support. Methods. A conceptual model of an object oriented system was developed based on a dynamic object system with message passing and dynamic dispatch. The developed object oriented system includes functions for creating and deleting classes, creating and deleting object instances of a class, functions for working with object properties, functions for adding methods to a class and passing messages. Inheritance is also possible, when a child class will have the properties of the parent class and its own properties. Results. The object oriented system was implemented using a set of macros and helper functions. The basic data structure was a hash table with key access capabilities, which was also implemented using macros. When a class is created, an instance constructor is automatically generated, setting the initial values of the object’s fields. Inheritance is implemented as the inclusion of fields of a parent class in a child object. Polymorphism is implemented as dynamic dispatch: when processing a message, a handler method is searched. The resulting object oriented system, together with the hash table module, occupies 97 lines. Conclusion. As a result of the work, a conceptual model of an object oriented system was created and implemented, which includes the main functions of the object oriented programming paradigm. It has been shown that macros can be used to create a compact object oriented system without the need to add any new functions or capabilities to the functional language interpreter.
Published Version
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
More From: Proceedings of the Southwest State University. Series: IT Management, Computer Science, Computer Engineering. Medical Equipment Engineering
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.