comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Any good package for mathematical function in Ada?
Date: Sat, 6 Jun 2020 09:06:54 +0200
Date: 2020-06-06T09:06:54+02:00	[thread overview]
Message-ID: <rbffae$1u3p$1@gioia.aioe.org> (raw)
In-Reply-To: 87y2p186ot.fsf@nightsong.com

On 06/06/2020 00:54, Paul Rubin wrote:
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
>> As for GMP specifically, I think that arbitrary precision numeric
>> types must be an integral part of Ada. Unfortunately, this would
>> introduce same mess Unbounded_String did. So, for now, I would not
>> push for them until the language type system mature to accommodate
>> them smoothly.
> 
> What happened with Unbounded_String if you don't mind telling the story?
> I wasn't around for it.

Unbounded_String is not string and not array, end of story.

> I can see why unbounded strings and numbers could be a problem for Ada,
> but that's because of storage management consequences, not the type
> system.

No, it is the type system. Randy posted links to the drafts for 
unbounded integer and real. Same story. They are not numbers. As a 
consequence you have no conversions to/from legal numeric types, you 
need to instantiate generics. They do not match formal numeric types in 
generics. They have no attributes (some of which would have no sense 
anyway).

In essence the problem is that numeric types have no explicit interface 
a private type could implement.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2020-06-06  7:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-31 10:46 Any good package for mathematical function in Ada? reinert
2020-05-31 11:26 ` Dmitry A. Kazakov
2020-06-01  8:17   ` reinert
2020-05-31 23:25 ` Jerry
2020-06-01  8:24   ` reinert
2020-06-01 10:19     ` Dmitry A. Kazakov
2020-06-01 10:48       ` Nasser M. Abbasi
2020-06-01 11:34         ` Dmitry A. Kazakov
2020-06-01 11:52           ` Nasser M. Abbasi
2020-06-01 13:37             ` Dmitry A. Kazakov
2020-06-02  1:48             ` Jerry
2020-06-05 22:49           ` Randy Brukardt
2020-06-05 22:54           ` Paul Rubin
2020-06-06  7:06             ` Dmitry A. Kazakov [this message]
2020-06-06 13:58               ` AdaMagica
2020-06-01 10:43   ` Dmitry A. Kazakov
2020-06-02  1:51     ` Jerry
2020-06-03 15:07     ` reinert
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox