j3-fortran / fortran_proposals

Proposals for the Fortran Standard Committee
175 stars 14 forks source link

Default module variables to `protected` #308

Open MicEsp22 opened 11 months ago

MicEsp22 commented 11 months ago

Allow for defaulting module variables to protected:

module <ModuleName>
   [<use statements>]
   implicit none
   protected         ! Currently only  public/private

   [...]
end module [<ModuleName>]

In such a case, protected access specifier would imply default public visibility for procedures/interfaces/DTs defined within the same module.