Is there a way to mark a method as pending to implement in Pharo?
Methods whose implementation is still pending should send the notYetImplemented
message like this:
methodImNotSureHowToImplement
^self notYetImplemented
if the unimplemented message gets sent anyway, it will signal a NotYetImplemented
exception which will know the offending selector, #methodImNotSureHowToImplement
in my example.
Note also that this will make it easy finding all methods that need to be implemented as senders of #notYetImplemented
.
The implementation of #notYetImplemented
is straightforward, thanks to the existence of NotYetImplemented
.
notYetImplemented
"Announce that this message is not yet implemented"
NotYetImplemented signalFor: thisContext sender selector
Note also that NotYetImplemented
is one of the subclasses of SelectorException
which model several situations of similar kinds:
SelectorException
NotYetImplemented
PrimitiveFailed
ShouldBeImplemented
ShouldNotImplement
SubclassResponsibility