An object (or a protocol or a category) is abolished by abolishing all its predicates, including those that define it as an entity. Thus, after calling abolish_object/1
. After, any attempts to access the abolished object (using e.g. curent_object/1
will throw an existence error.
True. But also a bit misleading in this case as Logtalk objects are not an abstraction over Prolog modules. They are not implemented using modules or require in any way that the backend Prolog compiler supports a module system. But you can do with objects everything you can do with modules. What makes Logtalk objects a technologically superior solution compared with Prolog modules is that you can natively and elegantly express a richer variety of programming idioms and patterns without having to resort to lower levels of abstraction to hack your way out or be forced to build your own custom abstractions. Thus, it’s not as much about making some tasks easier but more about what you can express at the same level of abstraction.