Skip to content

please use 'protected', not 'private' in C++ classes #2440

Closed
@bombasticbob

Description

@bombasticbob

use of 'private' in C++ classes makes it very difficult to create a derived class that's capable of providing functionality that extends the original, without actually cloning the code yourself to 'make it work anyway'. In my view, 'private' is an outdated and short-sighted concept anyway, particularly with open source. Using 'protected' accomplishes the same thing without tying anyone's hands. It's a simple edit to change all of the 'private' members to 'protected'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DuplicateAnother item already exists for this topic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions