1/8/2024 0 Comments Logtalk cheat sheet![]() An extends relation between two objects implies that both objects play the role of prototypes, with one of them extending the other, its parent prototype. For example, when an object instantiates another object, the first object plays the role of an instance and the second object plays the role of a class. Relations between entities define patterns of code reuse and the roles played by the entities. Logtalk provides objects, protocols, and categories as first-class entities. Some of the most important entity and predicate directives will be introduced in the next sections. ^^/1 - super call (of an inherited or imported predicate).to the object that received the message being processed) ::/1 - sending a message to self (i.e.Moreover, Logtalk can transparently interpret most Prolog modules as Logtalk objects. One important consequence is that Prolog code can be easily encapsulated in objects with little or no changes. Logtalk uses standard Prolog syntax with the addition of a few operators and directives for a smooth learning curve and wide portability. To keep its size reasonable, this tutorial necessarily assumes that the reader have a working knowledge of Prolog and is biased towards describing Logtalk object-oriented features. Logtalk is implemented in highly portable code and can use most modern and standards compliant Prolog implementations as a back-end compiler. Logtalk is an object-oriented logic programming language that extends and leverages Prolog with modern code encapsulation and code reuse mechanisms without compromising its declarative programming features.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |