Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion 2021/todo-abc.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,13 @@ I concur. In the end, you're probably not even going to need that abstract base

## Discussion

No comments. Want to make a comment? Edit this page. Then submit a pull request.
Rich Stewart 2023-02-21

Couldn't help noticing that this is close to the Smalltalk community's conventions for abstract classes. In most Smalltalks, there's a fundamental method, high up in the inheritance hierarchy, called ```subclassResponsibility```. So, any "abstract" method which ought to be implemented by a derived class sends ```subclassResponsibility``` to ```self```. If the method is not overridden, and then gets called at runtime, then ```subclassResponsibility``` is called and raises an exception .

I was writing some Python myself and thinking about this, and cobbled together my own variation on ```subclassResponsibility``` in Python. It's much less complicated.

Of course, yours is better at making Python IDE's highlight the problem "out of the box."



Expand Down