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.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.36.28.135 with SMTP id c129mr2438182itc.6.1519417352550; Fri, 23 Feb 2018 12:22:32 -0800 (PST) X-Received: by 10.157.68.105 with SMTP id f38mr115010otj.1.1519417352291; Fri, 23 Feb 2018 12:22:32 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer01.am4!peer.am4.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!o66no907039ita.0!news-out.google.com!s63ni2665itb.0!nntp.google.com!o66no907034ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 23 Feb 2018 12:22:32 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.240.211.93; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 85.240.211.93 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: questions on RM's section of subprograms and dispatching From: Mehdi Saada <00120260a@gmail.com> Injection-Date: Fri, 23 Feb 2018 20:22:32 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Body-CRC: 820642590 X-Received-Bytes: 3320 Xref: reader02.eternal-september.org comp.lang.ada:50607 Date: 2018-02-23T12:22:32-08:00 List-Id: I started reading extensively the RM on subjects that were barely touched b= y my course, firstly because it stopped at ada95, and it didn't touch concu= rrent programming either. Sections by sections, I'll ask precisions on impo= rtant points I couldn't understand, but felt that I should. package P is type I is interface; procedure Op (X : I) is abstract; end P; with P; package Q is type T is abstract new P.I with private; -- Op inherited here. private type T is abstract new P.I with null record; procedure Op (X : T) is null; end Q; with Q; package R is type T2 is new Q.T with null record; -- Illegal. Op inherited here, but requires overriding. end R; -> Is it because T2 is non-abstract and has access only to an abstract view= of P ? ___________ Note that it's possible to override a concrete subprogram with an abstract = one. -> It's even compulsory, since a type derived from a tagged type is itself = tagged, and tagged types with abstract primitives must be abstract, and can= have only abstract primitives. ------------------------ However, if the type is a generic formal type, the sub program need not be = overriden for the formal type itself (a nonabstract version will necessaril= y be provided by the actual type). -> what does it mean ?? What has it do exactly with=20 generic type FOO is abstract tagged private; function BAR(BORG: in FOO) return FOO; package PAC is .. end PAC; ? AI05-0073-1: ...an abstract primitive subprogram shall not be declared in the private pa= rt, unless it is overriding an abstract subprogram implicitly declared in t= he visible part. -> Why overriding an abstract primitive by another abstract primitive? What= can changed, besides aspects, on a subprogram with the same parameters pro= file ? Also, can parameters subtype of an overriding primitive be widened f= or use in non-dispatching calls, but so that it wouldn't mess with dispatc= hing calls ? Others to come ! But not for this section. Had plenty of things too technic= al, those ones were the only one I felt would impact me or be useful in any= way.