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: Mon, 25 Aug 2025 12:41:07 +0200 Organization: A noiseless patient Spider Message-ID: <108hek3$3c6u1$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> <10855lq$gj8l$1@dont-email.me> <1088h1a$19635$1@dont-email.me> <1089p1i$1ig1d$1@dont-email.me> <108aq2p$1qo9o$1@dont-email.me> <108dh2l$2f5h3$1@dont-email.me> <108ej11$2mbr8$1@dont-email.me> <108g1fv$32gqg$3@dont-email.me> <108h6b7$3a75k$3@dont-email.me> <87plcjn5ru.fsf@nightsong.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 25 Aug 2025 10:41:08 +0000 (UTC) Injection-Info: dont-email.me; posting-host="83346f1a4a3a4ac997eb0857b159dfbd"; logging-data="3546049"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/805ZQEt1JqFXNdbIh49tlxS0ALnFdZi0=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:iVYRosOiQkLJGLnfLfBp/sn8OMI= Content-Language: en-US In-Reply-To: <87plcjn5ru.fsf@nightsong.com> Xref: feeder.eternal-september.org comp.lang.ada:66917 List-Id: On 2025-08-25 10:51, Paul Rubin wrote: > "Dmitry A. Kazakov" writes: >>> It also has metaclasses. >>> Because classes, like functions, are first-class objects. >> >> A useless thing in an untyped language and in general one should first >> question what could be the purpose of a set of a set of types? > > Python metaclasses let you specify what is supposed to happen when you > instantiate a class, and that sort of thing. I.e. it's about runtime > behaviour. Why do I need to instantiate a class? Provided that it is obviously impossible since the class is an open set of types. I simply cannot know what is in it. E.g. I can load a DLL at run-time and derive new types there. The run-time behavior is not defined by "instantiation." It is partly by the root type specification and partly by the implementations of the class members = specific types. >> Provided one could implement that thing (let's ignore pitiful Python), >> What algorithmic problems one could solve with that? > > Types in general aren't for solving algorithmic problems. Thus the > Turing tarpit. Types are for being able to enforce rules about program > behaviour. ... and the program behavior is about solving algorithmic problems. In the hierarchy: value type (a set of values) class (a set of types) metaclass (a set of classes) What sort of problems metaclass is supposed to help solving, describing, abstracting. What is a closure operation of. E.g. dynamically polymorphic classes are closed upon type derivation. What would be the type algebraic operation to construct a set of sets of types? What are the typical properties shared by the members of a metaclass? You can continue the above hierarchy ad infinitum and beyond. But what for? > This is still worth reading: > > https://cdsmith.wordpress.com/2011/01/09/an-old-article-i-wrote/ It does not mention types of types. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de