DIP3

From D Wiki
Revision as of 04:16, 17 January 2013 by Jmdavis (talk | contribs) (This was already implemented as part of issue# 5299, so I'm just going to mark it as approved.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Title: Remove inheritance protection
DIP: 3
Version: 1
Status: Approved
Created: 2009-07-11
Last Modified: 2009-07-11
Breaks: Probably Little
Related Issue: Bugzilla 177
Links: DIP3/ArchiveOriginal Prowiki Page

Abstract

Non-public inheritance in a single inheritance language that has a single root object hierarchy makes little sense.

Rationale

Hiding 'Object' level attributes from a class leads to strange behavior.

Description

The compiler is behaving as spec'ed, but the value and correctness of this part of the spec is in question.

The suggested change, effectively drop one line from the grammar.

    SuperClass?:
        Identifier
        Protection Identifier // delete

An alternative would be for Object to always be forced to public visibility even if there's a break in the public chain up to it.

Copyright

This document has been placed in the Public Domain.