comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Virtual Components in Ada and Ruby
Date: Thu, 30 Jun 2005 13:55:18 -0500
Date: 2005-06-30T13:55:18-05:00	[thread overview]
Message-ID: <9r6dnRAyibfBolnfRVn-oA@megapath.net> (raw)
In-Reply-To: mailman.120.1120146983.17633.comp.lang.ada@ada-france.org

"Alexander E. Kopilovich" <aek@VB1162.spb.edu> wrote in message
news:mailman.120.1120146983.17633.comp.lang.ada@ada-france.org...
> Dmitry A. Kazakov wrote:
>
> > I think that "record interface" could drastically improve Ada.
>
> At least, after that addition it would not be possible to say that Ada is
> clearly inferior to Object Pascal/Delphi in this respect.
>
> Stubborn resistance to this feature in Ada somehow resembles that infamous
> long-lived absence of enumerations in Java.

I'm not sure what you guys are talking about, but certainly there has been
no "resistance" to virtual components - I don't think they've ever been
proposed or discussed before. Yesterday was the first time I can recall ever
seeing anything like that.

But the whole idea seems misguided to me - programs shouldn't be exporting
components [including discriminants] (virtual or otherwise) in the first
place. All of that should be hidden with a set of operations to access them,
construct them, and the like. Ada 200Y certainly has made that easier by
giving real constructors to limited types, so there should no longer be any
reason to expose any components.

As always, I can think of a handful of exceptions to the rule (just like
there are a few types that probably shouldn't be tagged and derived from
Controlled or Limited_Controlled), but there aren't enough of these to
justify any additional language features.

There's a better argument for a virtual array capability, because that has
properties that are tough to emulate with subprograms. But even that's
questionable (especially in face of the difficulties of defining and
implementing slices and aggregates for such things).

                            Randy.






  reply	other threads:[~2005-06-30 18:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-22 15:17 Virtual Components in Ada and Ruby Frank J. Lhota
2005-06-30  4:12 ` Randy Brukardt
2005-06-30  7:53   ` Dmitry A. Kazakov
2005-06-30 15:53     ` Alexander E. Kopilovich
2005-06-30 18:55       ` Randy Brukardt [this message]
2005-07-01 10:04         ` Dmitry A. Kazakov
replies disabled

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