This is called polymorphism in OOP. This is a base class animal_class which has
make_sound method. This method acts just as a place holder (interface), which the
extending class must extends (override) with an actual implementation.
The class is extended to make cat class and implementation is made.
module animal_class() option object; export make_sound::static:=proc(_self,$) error("Not implemented, must be overriden"); end proc; end module; %--------------- module cat_class() option object(animal_class); make_sound::static:=proc(_self,$) #note. DO NOT USE export print("mewooo"); end proc; end module;
And now
o:=Object(animal_class); o:-make_sound(); Error, (in anonymous procedure) Not implemented, must be overriden
The above is by design. As the animal_class is meant to be extended to be usable.
So the base class can have number of methods, which are all meant to be be have its implementation provided by an extending class. Each class which extends the base class must provide implementation.