Jean Vezina wrote:
> Van Snyder wrote:
> > Observing that the best documentation for code is code, it's most
> > convenient for users to have the _text_ of the specification at hand,
> > not the binary data base written by the compiler + separate documentation
> > of questionable authenticity. I don't know any library vendors that
> > take the trouble to strip out their trade secrets and then publish just
> > the interface parts of the modules.
>
> But, when Fortran 77 was the standard, we have worked a long time
> by relying only to documentation to call commercial library routines the
> proper way.
Sure, let's just forget language development. After all F77 was such
a good language.
Just because it is possible to write programs relying only on printed
documentation doesn't mean that it is the best way to do it.
You might note that in C it is possibile to provide prototypes to all
library routines without compromising any secrets. Header files serve
both as documentation for the programmer and as a means to check call
consistency. If, on the other hand, you don't want to write
the declarations, you don't have to. Somehow every commercial library
includes them, though.
> The rationale of this "defect" (no separation of specification from
> implementation) was to simplify the task of programmers by avoiding
> to them the tedious task of duplicating declarations.
The "tedious task" is done by editor's copy-and-paste operation.
If that's too much hassle, try drag-and-drop in most window-based
editors. You need to do it once when you write the procedure and,
perhaps, update when you change its interface. When the language
allows it, for this huge effort you get a lifetime of free help
from your compiler: every time you call the procedure you *know*
you called it OK the moment the compiler says so. A whole category
of bugs falls into oblivion.
You don't simplify the task of programmers by saving typing. If you
really believe you do, you should also propose to use at most three
letter keywords and leave the identifier length as it was in F77.
Also, banning indentation would save some typing, I guess.
Regards,
----------------------------------------------------------------------
Artur Swietanowski mailto:[log in to unmask]
Institut fuer Statistik, Operations Research und Computerverfahren,
Universitaet Wien, Universitaetsstr. 5, A-1010 Wien, Austria
tel. +43 (1) 407 63 55 - 120 fax +43 (1) 406 41 59
----------------------------------------------------------------------
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|