[J3] [EXTERNAL] US21 Enumeration type accessibility

Brad Richardson everythingfunctional at protonmail.com
Thu Oct 7 13:05:59 UTC 2021


I agree. This seems inconsistent with the rest of the language and can lead to problems.

On Thu, 2021-10-07 at 11:04 +0000, Clune, Thomas L. \(GSFC-6101\) via J3 wrote:

> I agree - we must have a mechanism to prevent a single USE statement from "polluting" the namespace in higher level program units.
>
> On 10/7/21, 4:45 AM, "J3 on behalf of John Reid via J3" <j3-bounces at mailman.j3-fortran.org on behalf of j3 at mailman.j3-fortran.org> wrote:
>
> Dear all,
>
> An enumeration type is not permitted to appear in a PUBLIC or PRIVATE
> statement(C874 on p. 114 of 21-007r2). Instead, its accessibility can be
> defined on an ENUMERATION TYPE statement (R767 on p. 91 of 21-007r2).
> This means that if an enumeration type is accessed in a module from
> another module, its accessibility cannot changed. Was this intended? I
> think it would be better to allow enumeration type in a PUBLIC or
> PRIVATE statement and remove accessibility from ENUMERATION TYPE
> statements. This would be consistent with the treatment of derived types.
>
> Comments, please.
>
> John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20211007/36e421e7/attachment.htm>


More information about the J3 mailing list