23 July 2000  Page 1 of 2  J3/00-250

Subject: Minor spec changes – accessibility and default initialization of parent component From: Van Snyder References: 00-247

1 Introduction – Specification

The accessibility of the parent component is at present the same as the default accessibility of components declared in the type. If one wishes to declare a different accessibility for the parent component, one is required to specify the default accessibility to be the desired accessibility for the parent component, and then declare the opposite visibility for all of the objects declared in the type. This paper advocates to allow an access specification in the EXTENDS clause of an extension type declaration. It is not at present possible to declare default initialization for the parent component. This paper advocates to allow an initialization expression for the parent component in the EXTENDS clause of an extension type declaration. This paper depends on terminology introduced in paper 00-247. In particular, the term parent component is used to refer to the data inherited from the parent type. A repair that is only superficially related is also made in 4.5.1.2 – initialization of pointer components had been completely omitted.

2 Syntax

The syntax of the EXTENDS type-attr-spec is changed from EXTENDS ( parent-type-name ) to EXTENDS ( [ access-spec :: ] parent-type-name [ = initialization-expr ] ).

3 Edits

Edits refer to 00-007r2. Page and line numbers are displayed in the margin. Absent other instructions, a page and line number or line number range implies all of the indicated text is to be replaced by immediately following text, while a page and line number followed by + indicates that immediately following text is to be inserted after the indicated line. Remarks for the editor are noted in the margin, or appear between [ and ] in the text.

or EXTENDS ( [ access-spec :: ] parent-type-name

41:11

[ = initialization-expr ] )

[Editor: Before “If” insert “If NULL() appears for a pointer component, that component in 45:39 any object of the type is initially disassociated (2.4.6).”

[Editor: initialization-expr ⇒ component-initialization.] 45:41

[Editor: “for ... that component” ⇒ “within the EXTENDS type-attr-spec or for a nonpointer 45:35 component, the parent component (4.5.3.1) or that component, respectively,”.]

[Editor: “(724) if component-name” ⇒ “(7.5.1.5) if that component”.] 45:38-39 [Editor: “component-name” ⇒ “the component”.] 45:39

The accessibility of the parent component (4.5.3.1) may be explicitly specified by an access-spec 49:10+ within the EXTENDS type-attr-spec. Otherwise, its accessibility is the same as the accessibility (New ¶) of the additional components of the extended type. This is independent of the accessibility of components of the parent component. J3 internal note Unresolved integration issue xxx So as not to require a forward reference to 4.5.3.1, subclauses 4.5.1.2 and 4.5.1.7 should be moved to be after (not subsidiary to) 4.5.3.

[Editor: Delete – description of accessibility of the parent component was put into 4.5.1.7 by 53:17-19 the edit for [49:10+] above.]