Re: optional or interface
- From: Paul van Delst <Paul.vanDelst@xxxxxxxx>
- Date: Wed, 04 Jun 2008 13:43:01 -0400
Arjen Markus wrote:
On 3 jun, 18:30, Paul van Delst <Paul.vanDe...@xxxxxxxx> wrote:Richard Maine wrote:Paul van Delst <Paul.vanDe...@xxxxxxxx> wrote:Yep, you're right. I always confuse the terms. Thanks for catching that.Erm.. I'm not quite sure what you mean here. I use INTERFACE forYou mean that you don't use interface bodies. An interface block is the
overloading, of course, but that's it. I don't use interface blocks (don't
see the point since I use modules). What do you mean by similar? Specific
to generic procedures?
only way to define a generic. Yes, I realize that those two terms are
easy to confuse; I've regularly confused them myself.
So, to be clear to the OP, I don't use interface bodies. (Keeping in mind that's a design
decision I made, not an indictment against interface bodies.)
cheers,
paulv
Interface bodies come in quite handy for situations where you can not
put the routine in a module:
Oh, yes, I quite agree. That was why I put in my parenthetical comment: it's a design decision on my part to not need interface bodies.
- You only have the compiled version of a library
- The library is written in a different language (like C for instance)
Even in these cases (at least, for the first one) I use wrapper routines that are in their own module (e.g. for accessing the lapack library).
In the interest of full disclosure I should state that I am somewhat biased against interface bodies because the same information is specified in two different locations. One always has to ensure that when changes are made, both locations are updated. Or, more preferably, one has a tool that generates the interface bodies automatically from the procedure interface itself.
cheers,
paulv
By using such interface bodies you get the same validity checks as.
with
modules, though it takes more work and you need to be careful in
specifying
the interfaces.
I have made it a rule for myself to put these interface bodies in a
module of
their own or part of a related module.
Regards,
Arjen
- References:
- Re: optional or interface
- From: Paul van Delst
- Re: optional or interface
- From: Mike
- Re: optional or interface
- From: Paul van Delst
- Re: optional or interface
- From: Richard Maine
- Re: optional or interface
- From: Paul van Delst
- Re: optional or interface
- From: Arjen Markus
- Re: optional or interface
- Prev by Date: Re: How do you know if the program is doing something ?
- Next by Date: Re: How do you know if the program is doing something ?
- Previous by thread: Re: optional or interface
- Next by thread: CVF66 question concerning obj and rsp files
- Index(es):
Relevant Pages
|
|