David B. Serafini wrote:
> I'd argue that separation of specification from implementation is desirable in
> the *output* produced by the compiler, but not in the *input*. I, as a
> programmer, do not want to write a separate specification of the interface to
> my procedures. This is much more time consuming and prone to error than some
> people think. Keeping these files in synch by hand is a waste of effort. If
> we had separate specification (as they do in Ada, I think) we would just have
> to develop tools outside the compiler to write the interface specs for us
> (which Ada has, I think). And furthermore, it's a waste of time to write these
> files because there is no reason the compiler cannot do it for us. The
> compiler has all the necessary information.
>
> This requires *no* changes to the language standard. It is a "quality of
> implementation" issue. (In Ada, they made the support tools part of the
> language standard, but as far as Fortran is concerned, nothing outside the
> compiler exists.)
>
> The only important issue is how you do 'make' (or something like it) using
> this specification file. The solution proposed by many is to have the compiler
> compare the existing spec. file (if one exists) and only change it if the spec.
> has changed. I think this is a bit of a kludge, but it does seem to be the
> only way. Whether the compiler does it or the Make tool does it or something
> in between does it is a relatively small issue. If a better has been
> suggested, I've missed it.
>
> I think it is obvious that we should lean on our compiler vendors to provide
> an interface specification output file, separate from whatever module file
> the compiler outputs, that contains the source code for the interfaces.
> This would provide portable, human and machine readable documentation
> that is automatically kept up to date.
I agree 100 % with this proposition. This will solve many of the
problems mentioned above. Programming is costly and software engineering
tools are a way to improve productivity. Manual procedures are tedious
and error prone. A tool that will extract the interface information from
the modules and produce readable output will complement a lot the
written documentation.
If this idea still brings problem, then language elements to allow
separation of specification (in a form that will be not be too tedious
to the programmer, like the proposal from Mr. Snyder) from
implementation will be required in the long term.
Regards,
Jean Vezina
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|