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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:292:: with SMTP id 140mr3833823itu.57.1559904146549; Fri, 07 Jun 2019 03:42:26 -0700 (PDT) X-Received: by 2002:aca:ea05:: with SMTP id i5mr3238720oih.51.1559904146274; Fri, 07 Jun 2019 03:42:26 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!g15no196028itd.0!news-out.google.com!l135ni294itc.0!nntp.google.com!g15no196025itd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 7 Jun 2019 03:42:25 -0700 (PDT) In-Reply-To: <47d02bdc-6b50-43aa-bc5d-bb5b6225f5bd@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=101.164.108.182; posting-account=wavAeAoAAAAZF_sXSZepBukuPCBO0Zqt NNTP-Posting-Host: 101.164.108.182 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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <7e038905-6e4d-4214-8ad3-de54fa6ba64e@googlegroups.com> Subject: Re: Why .ads as well as .adb? From: alby.gamper@gmail.com Injection-Date: Fri, 07 Jun 2019 10:42:26 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:56536 Date: 2019-06-07T03:42:25-07:00 List-Id: On Friday, June 7, 2019 at 5:59:26 PM UTC+10, Maciej Sobczak wrote: > > Of course, you are essentially saying that separate > > compilation is unnecessary and all of the source for a program should be in > > one giant file > > Of course you are proving now that you did not understand the question posted earlier in this thread. > > 1. There *are* languages that don't use separate spec files. Java and Python are well known examples, representing both compiled and scripted approaches. Both Java and Python are interpretive languages and can/do pre-compile to their native VM byte code as an optimization for their respective VM's to run. Neither language is truly compiled to native machine form as I understand it! > > 2. Programs written in those languages do *not* need to be written in one giant file. Actually, Java is frequently criticized (it was even in this thread) for forcing the programmer to use too many (!) files. Even though it does not have separate specs. > > Obviously, I'm *not* saying that separate compilation units are not needed and I'm *not* saying that programs should be written in one giant file. > > What I'm saying is that experiences gathered with other languages allow to question some of the reasons that are frequently cited as a justification for having separate spec files. At a high level :-) If you think of an Ada Specification file (ie ads) as being semi equivalent to an interface specification in other languages such as C#, C/C++, IDL, and the Implementation (ie adb) to a separate file then it may make sense. Look at the proliferation of source files that specify one or more C# interfaces in the MS Roslyn project and their separate implementation in other files. Although C# doesn't enforce the separation, it is common a (engineering, industry) practice within the C# and C/C++ space to do so. > > -- > Maciej Sobczak * http://www.inspirel.com