Skip to content
Discussion options

You must be logged in to vote

There's also a presumption that the original developer of the base class can entirely anticipate all the extension scenarios for every possible descendent.

I don't find this plausible even for base classes I'm writing for my own consumption, let alone as an author of a library that others would extend - there are too many ways that a descendent might want to augment the base class that still respect the functionality provided.

As a very simple counter example, creating a descendent that purely (and only) logs entry and exit to methods can be quite useful for understanding the order of interactions:

//  Defined by us as a consumer
public class LoggingWidget :Base 
{
    private readonly IL…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mauler2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants