Re: Host variable inheritance



Hello,

The chances of any version not very close to what's already
defined for interface blocks will most likely face a difficult
course.

If you think it's important, come argue your case.

James Giles wrote:
Dan Nagle wrote:
Hello,

Joe Krahn wrote:
Here's one more idea to help avoid unexpected bugs in CONTAINed
procedures: How about an INHERIT statement to control the
accessibility of host variables, i.e.:

INHERIT :: a,b,c
or
INHERIT NONE

Maybe something like this is already in the works?
It's been considered, but it never made the threshold.
If more folks were on J3, perhaps it would have.

Or, if more folks were aware that the committee was remotely
interested (though public debate of the possibility) and consequently
made their own support known, the existing members might have
perceived the need more acutely.

--

In any case, I've mentioned the feature many times in this forum.
My present version (in my toy language) is:

IMPORT :: rename-list

If a name isn't on the IMPORT list, you can still access it with
a qualified name:

hostname..entityname

or

_..entityname

The latter form is for case where the contained procedure is
in an INCLUDE file and therefore doesn't necessarily know
the name of the host. Whether that's a good idea or not is
still debatable. After all, how does it know the entity name
either? My rule is: try to figure all variations of a feature
and weed out the overkill later.

This is a special case of the IMPORT statement, which is what
I have instead of USE (mainly because I just get tired of writing
descriptions of Fortran code that have the phrase "then you use USE"
or some such thing).

The Fortran version could be to say

USE, ONLY: rename-list

A USE without a module name would be interpreted as
referring to the host. An empty rename-list would mean
that nothing was inherited by host association - unless Fortran
also chose to allow qualified names.



--
Cheers!

Dan Nagle
Purple Sage Computing Solutions, Inc.
.



Relevant Pages

  • Re: Host variable inheritance
    ... How about an INHERIT statement to control the ... the name of the host. ... descriptions of Fortran code that have the phrase "then you use USE" ...
    (comp.lang.fortran)
  • typeof for feature testing host methods
    ... host object methods. ... I have usually just feature tested the existence ... some browsers it may be that some other JavaScript has assigned a non- ... Both Thomas' and David's feature testing uses typeof for testing host ...
    (comp.lang.javascript)
  • Re: OT Vista Blues
    ... Windows Vista ships with the same full featured IIS7.0 bits thar are ... IIS (all web servers!) wraps that core to provide the following: ... you aren't going to host your website from home on your PC... ... to use a specific feature on their site, you're not going to get it. ...
    (comp.databases.pick)
  • Re: Q: Feature(badmx) - as added to version 8.14
    ... hosts in those domains are to be outbound servers only. ... on virtual hosts that do not receive mail. ... the feature is still going to ... host's, so the only mail that would be sent to the host is ...
    (comp.mail.sendmail)
  • Re: fortran 200X proposal: "use none" counterpart to "implicit none"
    ... Somehow language developers pushed in a lot of generic ... On the other hand there is something in the air about Fortran ... I like the 'import none' or 'inherit none' syntax much better. ...
    (comp.lang.fortran)