comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Float to String
Date: Thu, 11 Nov 2004 19:31:48 +0100
Date: 2004-11-11T19:31:48+01:00	[thread overview]
Message-ID: <1fu1slo2egbab.xitgjbz0nv4m.dlg@40tude.net> (raw)
In-Reply-To: mailman.95.1100191296.10401.comp.lang.ada@ada-france.org

On Thu, 11 Nov 2004 16:40:30 +0000, Marius Amado Alves wrote:

>> So it is kind of PL/1, pre Ada 83. You have elementary types and you can
>> compose structures out of them. The problem of all such approaches it that
>> the representation becomes fixed....
> 
> Not a problem here. Mneson is not for system programming. Mneson gives 
> you a semantic data model. It is a database system. Data independence 
> implies lost of representation control.

Isn't it controversial? To me independency means not to control the
representation, which might only illusory anyway, but to control the
interface. You define your requirements and it is up to the system to
figure out how to fulfill them. This is the way Ada 83 tried to deal with
numeric types.

>> type My_Integer is new Integer;
>>    -- My_Integer is built upon Integer. This cannot be portable.
>>    -- Or else one should go the Integer-N way. This cure is
>>    -- worse than the disease.
>> 
>> type My_Integer is range ..;
>>    -- This is portable, but does not fit in your model
> 
> Yes it fits, because Mneson basic types are designed big enough [1]. If 
> you have Ada integers you want to store in Mneson you just convert to 
> Integer_64.
> 
>     X : Vertex := To_Vertex (Integer_64 (Your_Integer));
> 
> And (at the base level) Mneson does not check the range, but you will 
> get that when you convert back to Your_Integer.
> 
>     Your_Integer := My_Integer (Integer_64'(Value (X)));
> ________
> [1] Well, "big enough" is currently 64 bits. There will be a 128-bit 
> version eventually.

And then 256-bit, where is any end? What you are trying to do is to define
a god-integer type to satisfy all possible requirements. That is
impossible. You can make it 1024-bit, but then it will be unsuitable for
pixels of an image. What about a database scalable from an embedded
microcontroller to a super cluster?

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



  reply	other threads:[~2004-11-11 18:31 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-08 17:06 Float to String Pascal Obry
2004-11-08 18:29 ` Jean-Pierre Rosen
2004-11-08 19:03 ` Jeffrey Carter
2004-11-08 20:13 ` David C. Hoos
2004-11-08 20:18 ` David C. Hoos
2004-11-09  0:40   ` John B. Matthews
2004-11-09  5:24     ` David C. Hoos, Sr.
2004-11-08 21:29 ` Nick Roberts
2004-11-09 17:58   ` Peter Hermann
2004-11-10  9:38     ` Peter Hermann
2004-11-10 12:12       ` Larry Kilgallen
2004-11-09  8:39 ` Dmitry A. Kazakov
2004-11-09 18:17   ` Pascal Obry
2004-11-10  8:53     ` Dmitry A. Kazakov
2004-11-10 11:15       ` Samuel Tardieu
2004-11-10 14:35         ` Dmitry A. Kazakov
2004-11-10 15:00         ` Peter Hermann
2004-11-10 15:35         ` Marius Amado Alves
2004-11-10 16:35           ` Dmitry A. Kazakov
2004-11-10 17:28             ` Marius Amado Alves
2004-11-11 15:25               ` Dmitry A. Kazakov
2004-11-11 16:40                 ` Marius Amado Alves
2004-11-11 18:31                   ` Dmitry A. Kazakov [this message]
2004-11-11 22:27                     ` Marius Amado Alves
2004-11-12 12:19                       ` Dmitry A. Kazakov
2004-11-12 14:55                         ` Marius Amado Alves
2004-11-10  5:05 ` Steve
2004-11-10 15:37   ` Pascal Obry
2004-11-10 16:29     ` Alex R. Mosteo
2004-11-10 16:48       ` Pascal Obry
2004-11-10 18:02         ` Marius Amado Alves
2004-11-10 19:40           ` Jeffrey Carter
2004-11-10 21:04             ` Marius Amado Alves
2004-11-11  3:33     ` Steve
2004-11-11  7:51       ` tmoran
2004-11-11 12:32         ` Pascal Obry
2004-11-11 15:53           ` David C. Hoos, Sr.
2004-11-11 16:17             ` Pascal Obry
2004-11-11 17:36             ` Jeffrey Carter
2004-11-12  0:01               ` David C. Hoos, Sr.
2004-11-12  0:30                 ` Jeffrey Carter
2004-11-11 12:30       ` Pascal Obry
2004-11-13 16:37 ` Ginduskina
2004-11-13 18:41   ` Björn Lundin
2004-11-13 16:39 ` Ginduskina
2004-11-13 16:49   ` Simon Wright
2004-11-13 16:53   ` David C. Hoos, Sr.
2004-11-13 16:55   ` Pascal Obry
replies disabled

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