comp.lang.ada
 help / color / mirror / Atom feed
From: fjloma@andaluciajunta.es (Francisco Javier Loma Daza)
Subject: Re: Adding "()" operator to Ada 200X
Date: 3 Jun 2003 12:52:32 -0700
Date: 2003-06-03T19:52:33+00:00	[thread overview]
Message-ID: <404ee0af.0306031152.4c94f89@posting.google.com> (raw)
In-Reply-To: 1ec946d1.0306021542.58714996@posting.google.com

mheaney@on2.com (Matthew Heaney) wrote in message news:<1ec946d1.0306021542.58714996@posting.google.com>...
> "Frank J. Lhota" <NOSPAM.lhota.adarose@verizon.net> wrote in message news:<V0LCa.32473$ca5.11277@nwrdny02.gnilink.net>...
> > There appears to be wide agreement that Ada 200X should include some sort of
> > standard container library like Charles and PragMark. This library will
> > probably include generic packages for creating and operating with dynamic
> > lists and maps. One can view these kinds of collections as generalized
> > arrays, and as such, it would be nice to use array notation for accessing a
> > member of one of these collections. 
> >
>  [snip]
> > I cannot help but think that this would be of tremendous help with whatever
> > standard container library is added to Ada 200X.
> 
> But all you've done is change the syntax.  None of your suggestions
> allow you to do more than is already provided by the library.
> 

Yes, I can first make a prototype using arrays, and when a more
dynamic structure is needed switch to a Single_List. If Single_List
have the same syntax of an array (operator (), and some attributes), I
have not to change a line of code. The same example with
Unbounded_String and String .... I know that I can do generics for
that purpouse, but then loosing all the syntactic richness/sugar.
Providing a consistent notation/syntax for arrays and user defined
containers would make the code look like better, isn't readability an
Ada goal?

Ada have very good support for basic types, why not have the same
support for user defined types?

> [snip]
[snip] 
> If you're going to make a change in the syntax of the language, then
> it has be because it allows you to do something you can't do already. 

Yes, I can live without that ... but then I will have to rewrite (and
retest) a lot of lines of code. Having that will make more readable my
code by not to worry about how every particular collection is defined.

[snip]
> For example, there's no way to declare an access subtype right now
> that means "all the access values except null."  A useful language
> change would be to allow the declaration:
> 
>   type Element_Access_Base is access all Element_Type;
> 
>   subtype Element_Access is Element_Access_Base range not null;

I like your proposal very much!!!



  parent reply	other threads:[~2003-06-03 19:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-02 16:35 Adding "()" operator to Ada 200X Frank J. Lhota
2003-06-02 23:42 ` Matthew Heaney
2003-06-03 14:59   ` Frank J. Lhota
2003-06-03 15:09     ` Frank J. Lhota
2003-06-03 16:04     ` Martin Krischik
2003-06-04 17:28       ` Matthew Heaney
2003-06-04 18:21         ` Frank J. Lhota
2003-06-05  1:15           ` Robert I. Eachus
2003-06-05 14:59             ` Frank J. Lhota
2003-06-05 17:25             ` Matthew Heaney
2003-06-03 20:24     ` Randy Brukardt
2003-06-03 19:52   ` Francisco Javier Loma Daza [this message]
2003-06-03  2:56 ` Fionn mac Cuimhaill
2003-06-03 14:02   ` Matthew Heaney
2003-06-03 16:23   ` Mário Amado Alves
2003-06-05 19:02     ` Dmitry A. Kazakov
2003-06-06 10:56       ` Mário Amado Alves
2003-06-06 16:55         ` Chad R. Meiners
2003-06-06 19:01         ` Frank J. Lhota
2003-06-09 14:15           ` Matthew Heaney
2003-06-07  8:36         ` 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