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!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!newsswitch.lcs.mit.edu!nntp.TheWorld.com!.POSTED!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: 'Class'Class'Class'Class ad libitum Date: Tue, 13 Sep 2016 14:53:15 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: NNTP-Posting-Host: shell02.theworld.com Mime-Version: 1.0 Content-Type: text/plain X-Trace: pcls7.std.com 1473792730 26463 192.74.137.72 (13 Sep 2016 18:52:10 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 13 Sep 2016 18:52:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:de7r52fvLkS6XoJUnO5y/jJOS3Q= Xref: news.eternal-september.org comp.lang.ada:31780 Date: 2016-09-13T14:53:15-04:00 List-Id: "J-P. Rosen" writes: > I guess this is allowed because nobody cared about complicated rules to > forbid it (mainly on the ground that it's useless, but harmless). I think it was to make this work: generic type Formal (<>) is tagged private; package G is pragma Elaborate_Body; end G; package body G is subtype S is Formal'Class; end G; with G; package P is type T is tagged null record; package Inst is new G (Formal => T'Class); end P; We don't want the legality of an instance to depend on the contents of the generic body. > ...There > are many things like that: > T'(T'(T'(X))) > X+0+0+0 > ... - Bob