comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Simple example on interfaces
Date: Wed, 27 Jan 2021 09:05:33 +0100	[thread overview]
Message-ID: <rur6sc$1beu$1@gioia.aioe.org> (raw)
In-Reply-To: ruqli6$rav$1@franka.jacob-sparre.dk

On 2021-01-27 04:09, Randy Brukardt wrote:
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote in message
> news:ruprf8$1h6q$1@gioia.aioe.org...
> ...
>>> universal_integer is anonymous and doesn't have any operations (except
>>> automatic conversion).
>>
>> Yes. In a never ending discussion with Randy I insist that this stuff
>> should be made explicit, available for any types.
> 
> As I've often said, for a new language that would certainly be a good idea.
> For Ada, reproducing all of the quirks of Ada would lead to an inpentrable
> mess. And not reproducing them would break a lot of code (and more
> importantly, no one could tell if their code would be broken and in extreme
> cases, wouldn't even know as the code would silently change meaning).

Universal_Integer is already implemented in all existing compilers.

> As far as full multiple inheritance being too expensive to implement, I tend
> to think that is true for interfaces as well. :-) As always, the question is
> whether one wants fast code or just something that works. Full multiple
> inheritance certainly can be implemented by converting all selectors to
> Getter/Setter pairs and dispatching on every use. But that's pretty
> expensive for accessing an integer component.

Same. All this is already there and implemented. The question is why is 
it not formalized in the language?

Consider this Ada 83:

    Jagged : array (1..100) of String;

This is valid construct though not allowed (someone like you said it 
would be too expensive to implement).

OK, do not implement it, but at least allow to spell the concept of an 
array of strings!

What you say is that I cannot have an array of integers because arrays 
of strings is so useless, dangerous and mess, would require to design a 
new language etc. I did not asked arrays of strings, so far... (:-))

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

  reply	other threads:[~2021-01-27  8:05 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 16:08 Simple example on interfaces Mario Blunk
2021-01-25 16:41 ` Dmitry A. Kazakov
2021-01-25 17:51   ` Mario Blunk
2021-01-25 22:06     ` Dmitry A. Kazakov
2021-01-26  7:33       ` G.B.
2021-01-26  8:07         ` Dmitry A. Kazakov
2021-01-26  8:17           ` Mario Blunk
2021-01-26  8:55             ` Dmitry A. Kazakov
2021-01-26  9:37       ` J-P. Rosen
2021-01-26 10:25         ` Dmitry A. Kazakov
2021-01-26 11:15           ` AdaMagica
2021-01-26 11:53             ` Dmitry A. Kazakov
2021-01-26 16:46               ` AdaMagica
2021-01-26 19:44                 ` Dmitry A. Kazakov
2021-01-26 20:04                   ` Shark8
2021-01-26 21:34                     ` Dmitry A. Kazakov
2021-01-27  3:11                     ` Randy Brukardt
2021-01-27 22:51                       ` Shark8
2021-01-30  8:33                         ` Randy Brukardt
2021-01-27  3:09                   ` Randy Brukardt
2021-01-27  8:05                     ` Dmitry A. Kazakov [this message]
2021-01-26 10:02     ` Stephen Leake
2021-01-25 17:00 ` Jeffrey R. Carter
2021-01-27  1:48   ` philip...@gmail.com
2021-01-27  8:06     ` Dmitry A. Kazakov
2021-01-27  3:36   ` Randy Brukardt
2021-01-27 23:04     ` Shark8
2021-01-25 19:05 ` Stephen Leake
replies disabled

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