Re: fortran 200X proposal: "use none" counterpart to "implicit none"
- From: *** Hendrickson <***.hendrickson@xxxxxxx>
- Date: Sun, 05 Apr 2009 16:11:50 GMT
alexei.matveev@xxxxxxxxx wrote:
On the USE statement you can specify the module natureof that flying are about zero. The odds of getting an "import none" orI agree with this. What if you have already a program that has a
"inherit none" or some such odd thing would seem far better than
confusingly bringing in modules, which don't otherwise appear to have
anything to do with it.
module named 'none'? This proposal would not be upward compatible
with such a program.
There must be a way to deal with that. Like specifying -std=f95
or similar. Somehow language developers pushed in a lot of generic
intrinsic functions that might have had eventual name clashes with
existing programs.
with previous versions, and there should be a very good reason why
such an inconsistency should be introduced.
On the other hand there is something in the air about Fortran
having lots of special cases placing high burden on Fortran
developers (I am not one of them). OTOH, intrinsic modules is a
natural direction for a language to evolve without introducing
backwards incompatible syntax. As a side not an reference
empty implemention for module "none" would allow backports,
having no intended effect of course.
Even if there were such an "intrinsic module" introduced, this
behavior would be very different than other modules, intrinsic or
otherwise. No other module undoes or nullifies other modules.
R1110 module-nature is INTRINSIC
or NON_INTRINSIC
And there are tie-breaker rules that resolve the
case where you don't specify the nature and both versions
exist.
Given that there is already an IMPORT statement, extending that
to have a "NONE" keyword seems like a better idea. You could also
add an "ALL" keyword to prevent accidentally renaming something
in a contained subroutine.
*** Hendrickson
Modules are the only available construct to allow namespace.
manipulation in Fortran, they are new, so if we do not try
to postulate their semantics is settled forever why not to
start here?
I like the 'import none' or 'inherit none' syntax much better. These accomplish the goal (which is a good goal) without introducing
compatibility problems with previous standards. Something like
'import, only:' might also work. If nothing is included in the
I think any syntax will be welcome. This move to parallel shared
memory
architectures will require a lot of effort to be put into thread-
safety
of your programs. One would like to be able to *reason* about that
safety -- having "use/import none" at the top is a huge hint about
that.
Alexei
- References:
- fortran 200X proposal: "use none" counterpart to "implicit none"
- From: alexei . matveev
- Re: fortran 200X proposal: "use none" counterpart to "implicit none"
- From: Richard Maine
- Re: fortran 200X proposal: "use none" counterpart to "implicit none"
- From: Ron Shepard
- Re: fortran 200X proposal: "use none" counterpart to "implicit none"
- From: alexei . matveev
- fortran 200X proposal: "use none" counterpart to "implicit none"
- Prev by Date: Re: EQUIVALENCE statement
- Next by Date: Re: 50 years of progress in the language
- Previous by thread: Re: fortran 200X proposal: "use none" counterpart to "implicit none"
- Next by thread: Re: fortran 200X proposal: "use none" counterpart to "implicit none"
- Index(es):
Loading