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=ham 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: Sun, 31 Aug 2025 11:15:51 +0200 Organization: A noiseless patient Spider Message-ID: <10913s8$34d8f$2@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> <10855lq$gj8l$1@dont-email.me> <1088h1a$19635$1@dont-email.me> <1089p1i$1ig1d$1@dont-email.me> <108aq2p$1qo9o$1@dont-email.me> <108b1r3$1sj3c$1@dont-email.me> <108dh4t$2f5h3$2@dont-email.me> <108dkik$2g20p$1@dont-email.me> <108g1cg$32gqg$2@dont-email.me> <108h6b0$3a75k$2@dont-email.me> <108iiq5$3lihe$3@dont-email.me> <108mhhk$j2jt$1@dont-email.me> <108mis1$j4cj$1@dont-email.me> <108o33p$vok4$5@dont-email.me> <108o6rp$10njb$1@dont-email.me> <108o7cm$10qct$1@dont-email.me> <108o845$10pj9$3@dont-email.me> <108oann$115to$1@dont-email.me> <108occm$11h9j$2@dont-email.me> <108p3om$16qn1$3@dont-email.me> <108r884$1osg9$3@dont-email.me> <108rn4h$1rkon$2@dont-email.me> <108vts7$2sngv$3@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 31 Aug 2025 09:15:53 +0000 (UTC) Injection-Info: dont-email.me; posting-host="15ca0f2de6af3f69767d32890f410388"; logging-data="3290383"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+FRCJhFFniL0j0WWLJXKr3t8dxEfzLYbs=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:ljpIJSG95B1W6jmGxhW07/LUlBU= In-Reply-To: <108vts7$2sngv$3@dont-email.me> Content-Language: en-US Xref: feeder.eternal-september.org comp.lang.ada:67009 List-Id: On 2025-08-31 00:27, Lawrence D’Oliveiro wrote: > On Fri, 29 Aug 2025 10:07:45 +0200, Dmitry A. Kazakov wrote: > >> On 2025-08-29 05:53, Lawrence D’Oliveiro wrote: >> >>> But they are still of that same “Abstract_Packet'Class”, which is >>> the base class. >> >> Yes, because it was designed so. This is what being typed is. > > That is what “being statically typed” is. No, being able to specify a set of types is neither static nor dynamic. Nothing in dynamic typing prevents you from doing that and checking at run-time if the constraint satisfied. But when the behavior is defined as WHATEVER as in Python that is untyped. It is equivalent to having a single proper type with some tag called "dynamic type." All dynamically typed languages are statically typed in that sense, which is why they are uninteresting from the type system point of view. >>> You cannot specify “Foo_Packet'Class” as the return type on one >>> call, “Bar_Packet'Class” on another call, etc. >> >> Why should I? > > Because that’s what dynamic typing means. Dynamic typing means that the type of an object is not statically determinable and that it can change. In a statically typed language the type is determinable and cannot be changed. Any dynamically typed language can be reduced to an equivalent statically typed one. > Remember, if a language is not typed (e.g. BLISS, BCPL), then you > don’t specify any types at all. Just like in Python where types of arguments and results are not specified. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de