From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.ada Subject: Re: Why .ads as well as .adb? Date: Sun, 09 Jun 2019 11:56:03 -0700 Organization: None to speak of Message-ID: References: <28facad3-c55f-4ef2-8ef8-004925b7d1f1@googlegroups.com> <87woi0xtwm.fsf@nightsong.com> <4a0438de-1f1d-4469-aae4-908854d378ea@googlegroups.com> <47d02bdc-6b50-43aa-bc5d-bb5b6225f5bd@googlegroups.com> <455333f0-ede4-4833-900a-240a499395ac@googlegroups.com> <875zphvufc.fsf@nightsong.com> <87y32bvbeo.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: reader02.eternal-september.org; posting-host="fdf5fda0e711fff71bd085244104dd86"; logging-data="22167"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18+yxsElOM9D4JJ4/TuVCPb" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:k2CcL28r/RvcWAyzLyMHIFqkF4U= sha1:S9FxvOr+AlNKl/wPpSEZ+8z4LxU= Xref: reader01.eternal-september.org comp.lang.ada:56581 Date: 2019-06-09T11:56:03-07:00 List-Id: Paul Rubin writes: > Keith Thompson writes: >> Math textbooks have a table of contents and an index. Both *could* be >> in separate volumes, but there would be no particular advantage in that >> (though it's entirely possible that the author kept them in separate >> files). > > Sure, that's a good comparison. Actually typically, the TOC and index > are generated by software using inline markers that the author puts in > the text. There might be an occasional situation where you want the TOC > and the main text to be in separate volumes (like for a 100 volume > series you could want a special volume just for the TOC), but normally > it's fine to print both in the same volume. Programs are not books. > So it still seems annoying to requires the spec and body to be in > separate files. Code is read more often than it's written. As someone reading code and trying to understand it, I appreciate having the specification by itself in a separate file, so I can see the information needed by clients of the code without having to concern myself with the implementation (which can vary). How often do you want to read the specification of Text_IO? How often do you need to read the implementation? Tools that can generate a specification from a possibly annotated implementation are fine, but it's inconvenient (and sometimes impossible) to invoke such a tool every time I want to see the specification. [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Will write code for food. void Void(void) { Void(); } /* The recursive call of the void */