comp.lang.ada
 help / color / mirror / Atom feed
From: maa@liacc.up.pt (Mário Amado Alves)
Subject: Re: Adding "()" operator to Ada 200X
Date: 3 Jun 2003 09:23:12 -0700
Date: 2003-06-03T16:23:12+00:00	[thread overview]
Message-ID: <4a4de33a.0306030823.cd30642@posting.google.com> (raw)
In-Reply-To: s53odv46kst9rb73a8tsuqmgft6d7ap105@4ax.com

> >    function "()" ( Source : in Array_Like_Type;
> >                    Index  : in Index_Type )
> >       return Component_Type;
>
>  To go along with this, a way to define a slice of an
> Array_Like_Type would be nice.

Great idea!

function "()"
  (Source : in Array_Like_Type;
   From : in Index_Type;
   To : in Index_Type)
  return Array_Like_Type;

Or "(..)".

Yes, Matthew, it's just syntax. So are the (already) redefineable
operators. But it's really useful, no? Compare e.g.
  ...
  +"Marius",
  +"Matthew",
  ...
to
  ...
  new String' ("Marius"),
  new String' ("Matthew"),
  ...

Actually the fact that it's just syntax might facilitate getting it
approved :-)

BTW, I think that if a standard containers library is included in 200X
then Ada.Strings.Unbounded and the like should be revised in terms of
it. It would drastically reduce the size of the specs. It would
suffice to say something like

  Unbounded_String is equivalent to the container type
  of an instantiation of Ada.Containers.Arrays.Unbounded
  with the type Character.

--Marius



  parent reply	other threads:[~2003-06-03 16:23 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
2003-06-03  2:56 ` Fionn mac Cuimhaill
2003-06-03 14:02   ` Matthew Heaney
2003-06-03 16:23   ` Mário Amado Alves [this message]
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