On Mon, Mar 5, 2018 at 11:36 AM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:
What I don't understand is how you propose that the _using_ routine be informed of the interface requirements.
It would simply read the interface directly, wherever it lives. The
most likely place for that would be wherever the procedure is defined.
But I could also see having something separate. If separate, then it
could be something akin to a /COPY member, but not semantically
equivalent to copying, and not usable for arbitrary purposes. Maybe
call it /IMPORT, and only allow prototype information. (If you want to
talk practicality of implementation, this is only a small adjustment
to /COPY.)
It's easy to brainstorm alternatives, or more fleshed-out mechanisms.
For example, in the defining source, there could be an /EXPORT
directive to mark an exported interface, and the compiler could use
that to generate whatever it is that would be needed for successful
/IMPORT by the caller. Could be extra information stored in the
*MODULE object, or could be a completely new and separate *PROTOTYPE
object, whatever.
I can't imagine these ideas are incredibly novel. (I *think* they are
more-or-less along the lines of at least some of what Dieter was
talking about.)
John Y.
As an Amazon Associate we earn from qualifying purchases.