From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on ip-172-31-91-241.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=none autolearn=unavailable autolearn_force=no version=4.0.1 Path: nntp.eternal-september.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: In precision typing we trust Date: Tue, 19 Aug 2025 09:29:25 +0200 Organization: A noiseless patient Spider Message-ID: <108194n$3jqmc$1@dont-email.me> References: <107uv9g$3019a$1@dont-email.me> <107v1ji$303of$1@dont-email.me> <336fbb5f-a279-ea8e-67fd-f62bb00d6a89@irrt.De> <107vfb9$34cpj$1@dont-email.me> <10815an$3iu6o$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Tue, 19 Aug 2025 07:29:28 +0000 (UTC) Injection-Info: dont-email.me; posting-host="0b0c54b7abc5b85678b4cf45b5ee5d24"; logging-data="3795660"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+o0ohs92MPhuD9kWrPcz7kp+ofjzGlKhk=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:2PhZ6vM3Pldq783ok6wi0v6RT2E= Content-Language: en-US In-Reply-To: <10815an$3iu6o$1@dont-email.me> Xref: feeder.eternal-september.org comp.lang.ada:66882 List-Id: On 2025-08-19 08:24, J-P. Rosen wrote: > Le 18/08/2025 à 17:03, Dmitry A. Kazakov a écrit : > >> Ada is a strongly typed language so Ada is not an OOP language. > > > > Ada is a strongly typed OO language. > > More precisely: > OOP implies a weakening of the typing system, since a wider class can > contain any object of the subclass. > But in Ada, this can happen only for objects of a class-wide type; so > you get it only if you ask for it, and you immediately know from the > type of an object which values it can hold. Yes, however class-wide objects only behave as if they held specific type objects. The class-wide type is still a different type, so the type system remains strong. Constrained subtypes are even "weaker" in that respect, e.g. Positive vs. Integer. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de