Skip to content

Please reconsider use of final and private properties to improve extensibility #45

@leek

Description

@leek

I’ve been integrating this project into a larger system and have run into several cases where the use of final classes/methods and private properties makes it difficult (or impossible) to extend functionality cleanly.

Problem

The current design makes subclassing or behavior customization difficult without forking the codebase. For example:

  • final prevents extending classes to override small behavior differences.
  • private properties prevent access even from child classes, blocking small adjustments or overrides.

Proposal

  • Replace private with protected for properties or methods that might reasonably be overridden in subclasses.
  • Avoid marking classes/methods as final unless there’s a specific safety or design concern that requires it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions