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:a05:660c:350:: with SMTP id b16mr27463022itl.178.1559725459268; Wed, 05 Jun 2019 02:04:19 -0700 (PDT) X-Received: by 2002:aca:5ed7:: with SMTP id s206mr7168092oib.122.1559725458965; Wed, 05 Jun 2019 02:04:18 -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!i64no114131iti.0!news-out.google.com!l135ni131itc.0!nntp.google.com!i64no114129iti.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 5 Jun 2019 02:04:18 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=165.225.84.81; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S NNTP-Posting-Host: 165.225.84.81 References: <28facad3-c55f-4ef2-8ef8-004925b7d1f1@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <89abdd73-28ff-46ec-b77e-b8324d496d9c@googlegroups.com> Subject: Re: Why .ads as well as .adb? From: Maciej Sobczak Injection-Date: Wed, 05 Jun 2019 09:04:19 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:56480 Date: 2019-06-05T02:04:18-07:00 List-Id: > > So what exactly cannot be deduced? >=20 > The class. What if I don't need the virtual "class" and I'm interested in the single i= nstance only? The one that I wrote? I'd argue this is the most frequent case. > > Please provide some challenging example. >=20 > Let x be 1. Deduce the set it belongs to. >=20 > procedure Foo is > begin > X :=3D 1; -- What are the type of X, 1, > end Foo; This is not a complete code, exactly because the type of X is not known. But if you declare X so that it is visible where Foo is, then the informati= on is complete and the spec can be generated (which also means it's not nee= ded). It was stated at the beginning of this discussion that there are languages = that do it. Arguing that it cannot be done is simply not convincing - just = look at languages where it is already done. For example - how would your example look in Java? > To make programmer's life a bit easier? Isn't it the most important purpose of having programming languages at all? Do you want to convince me that the purpose of Ada is to make the programme= r's life more difficult? Then, I can tell you, there are countless numbers = of beginners who are already convinced that this is actually the case. > That does not change anything in the nature of declarations. They are=20 > semantically separate and the programming language should keep this=20 > distinction clear. But we still don't know why it should do it. We know that Ada does (well, o= nly pretends to, I can still mix everything), but we don't know whether thi= s distinction is worth having, especially in the context of experiences gai= ned from using other languages that don't have it. > You mean I have that much influence on designers of C/C++ software If you are designing C/C++ software, then I hope so. I disagree with your argument that in Ada one can have separate *.adb files= for different platforms, whereas in C++ one uses #ifdefs. This is just wro= ng. > You are asking religious questions, why people keep on doing bad things? (Lack of) Education might be the answer. But note that lack of education is also the reason for people to stay unawa= re of Ada. So we have a choice: educate people to write good C++ or educate= people to write Ada. But choice is a burden. Right? :-) --=20 Maciej Sobczak * http://www.inspirel.com