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!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Dynamic type system for Ada Date: Tue, 24 Jan 2017 14:44:55 +0100 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: vZYCW951TbFitc4GdEwQJg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:33140 Date: 2017-01-24T14:44:55+01:00 List-Id: On 24/01/2017 14:12, Victor Porton wrote: > I thought on combining powers of static (like Ada) and dynamic (like Python) > languages. In two seconds I understood that this can be done by creating a > special "Dynamic" type in a static language. There is no such thing as a dynamic type system. A dynamic type is a value of some static type, e.g. "any" or "type type" etc. The hierarchy must end somewhere and that is always a static type. > Due to pure curiosity, I ask: Has anybody developed a dynamic type system > for Ada? AFAIK there were no proposals to add a type type to Ada. There exist some rudimentary means, like generic constructor, but nothing beyond that. Then before going to type types there is a lot of space in the 1st order types for improvements that could eliminate a need in going 2nd order. Presently Ada lacks: 1. Ad-hoc supertypes 2. Interface inheritance 3. Full multiple dispatch 4. Array, record, access, integer, float, discrete, enumeration types interfaces to inherit from 5. Introspection E.g. for weakly coupled systems like distributed ones, the 2nd order types is not that important. You would not propagate primitive operations over the network anyway. Some sort of introspection is usually enough. In most cases 2nd order types is an overkill. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de