[J3] [EXTERNAL] Re: Private enumerators

Van Snyder van.snyder at jpl.nasa.gov
Sat Oct 19 16:44:04 EDT 2019

On Sat, 2019-10-19 at 14:58 -0400, Vipul Parekh via J3 wrote:
> Van,
> As I was trying to suggest as politely as I could (!) during subgroup
> discussions, an attribute of 'private' on an enumerator in an
> enumeration type makes no sense to me.
> The plenary discussions and the requirements paper effectively
> established an enumerator is NOT a component of the enumeration type.
> The point also being a derived type is not quite a good way to look at
> the enumeration type.  I think an "array named constant" is likely the
> closest analogy one can draw for an enumeration type, and an array
> element for the enumerator member of the enumeration type:
> * And note, the Fortran standard applies the PRIVATE/PUBLIC attribute
> on the whole of the "array named constant", one does not get to modify
> the visibility of its individual elements.
> I think the same applies to an enumeration type: one shall not specify
> the visibility on the enumerator members in an enumeration type.
> Paper 19-249r1 can be simplified further with this aspect removed.
> Also, my impression of the feedback during the plenary was calling for
> *a few example syntax listings* (however trivial or obvious it may be
> for you) in the revised paper, not more verbiage on a use case.

When enumeration types were specified in 19-216r1, enumerators were
class (1) names. We do not have any class (1) names for which
<access-spec> is prohibited.

BIND(C) enumerators can have <access-spec>

There might well be enumerators that aren't interesting to the client of
a module. That could have been handled with an extension type -- but
that was kicked off the table too.

> Regards,
> Vipul
> On Sat, Oct 19, 2019 at 1:36 PM Van Snyder via J3
> <j3 at mailman.j3-fortran.org> wrote:
> >
> > Gary objected to private enumerators.
> > ..
> > Can we have a mail vote to proceed with 19-249r1?
> >
> >

More information about the J3 mailing list