Skip to content

Improved control of type bound procedure accessibility #127

Open
@nncarlson

Description

@nncarlson

Here is a problem I regularly encounter: I have a class with a type bound procedure that (a) should not be publicly accessible (for invoking); but (b) I want to allow an extension of the class to override the procedure. In many cases the class is an abstract type and the procedure is deferred. This appears in the non-virtual interface (NVI) pattern, for example. Because of (a) I want to declare the procedure private, but due to (b) I have to let it be public (the two type declarations are in separate modules).

I wish there was another type bound procedure accessibility attribute between public and private with the effect that the procedure would not be accessible for invoking, but would be accessible when declaring an extension of the type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Clause 9Standard Clause 9: Use of data objects

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions