comp.lang.ada
 help / color / mirror / Atom feed
From: "Mark Lundquist" <mlundquist2@attbi.com>
Subject: Re: Ada2005
Date: Wed, 12 Dec 2001 18:14:44 GMT
Date: 2001-12-12T18:14:44+00:00	[thread overview]
Message-ID: <o8NR7.13079$7y.147028@rwcrnsc54> (raw)
In-Reply-To: nxKR7.58838$xS6.95364@www.newsranger.com


"Ted Dennison" <dennison@telepath.com> wrote in message
news:nxKR7.58838$xS6.95364@www.newsranger.com...
> In article <9v7q8r$1f5$1@infosun2.rus.uni-stuttgart.de>, Peter Hermann
says...
> >
> >Carsten Freining <freining@informatik.uni-jena.de> wrote:
> >> Best example is the object oriented part, because it is not possible to
have
> >> constants as components.
> >
> >Compiler maintainers may insert the already existing keywork "constant"
> >in coffee break time.

It'd be better if others would study RM 3.7 during their coffee break time
:-)

>
> Why would anyone want to? Isn't it rather stupid to allocate space in
several
> objects to a field that will always be the same? I understand why C++ does
this:
> they don't have packages to put their constants into. So if one wants to
> associate a constant with a class, there is no choice but to do it this
way and
> waste the space.

No... you can do this

in Foo.h:

    class Foo {
        static int i;
        .
        .

in Foo.C (typically):

    int Foo::i = something;

It's kind of wack, but we do have this in C++.

I think what the OP means is something like a const data member in C++.  If
so, he should learn about discriminants.

> >> And there is still the fixed length String. I don't think it is
neccessary.
> >
> >The fixed length string is a core requirement for
> >bread_and_butter_softworkers.
>
> I don't think the poster has much experience with Ada strings. Anyone who
truly
> understood Ada strings would never say something like this. In fact, its
almost
> the *opposite* of what is true. Its fairly rare that I ever need to use
> Ada.Strings.* (well...some of the stuff in Ada.Strings.Fixed comes in
handy
> fairly often :-) ).
>
> >> compatibility they both can still be available, but I think it is an
ancient
> >> thing to still have a fixed length String were only String with exactly
the
> >> same length can be assigned.
>
> This is part of the core misunderstanding here. Its unusual that one ever
needs
> to "modify" a string, once its initial value is set. Most of what others
may
> consider "modifications" are actually dynamicly arriving at the initial
value,
> or building new strings using old ones as a base. Both of these situations
can
> usually be handled just fine with Ada's "old-fashioned" fixed strings.

Yes to all of the above.

>
> I think part of the stumbling block here for beginners is that one of the
> exceptions to this is one of the first things they will try to do:
Ada.Text_IO.
> Perhaps there should be a revision in there to include a version of
Get_Line
> implemented as a function.

...such as GNAT's Ada.Strings.Unbounded.Text_IO.Get_Line.  I think it would
be great if that were added to the standard in a language revision.

> That would allow beginners to get off on the right
> foot with string manipulation. This seems to be a legitimate problem.
>

Agreed!

-- mark






  parent reply	other threads:[~2001-12-12 18:14 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-11  9:33 Ada2005 Peter Hermann
2001-12-11 11:05 ` Ada2005 M. A. Alves
2001-12-11 11:55   ` Ada2005 Aaro Koskinen
2001-12-11 14:49     ` Ada2005 Wes Groleau
2001-12-11 14:58     ` Ada2005 Marin David Condic
2001-12-11 15:18       ` Ada2005 Ted Dennison
2001-12-12  8:37       ` Ada2005 Alfred Hilscher
2001-12-11 11:23 ` Ada2005 Martin Dowie
2001-12-11 11:54 ` Ada2005 Preben Randhol
2001-12-11 12:06 ` Ada2005 Larry Kilgallen
2001-12-11 14:39 ` Ada2005 Ted Dennison
2001-12-12  4:39   ` Ada2005 Jeffrey Carter
2001-12-13 18:39   ` Ada2005 Randy Brukardt
2001-12-12 11:29 ` Ada2005 Peter Hermann
2001-12-12 12:42   ` Ada2005 Larry Kilgallen
2001-12-12 12:51   ` Ada2005 Martin Dowie
2001-12-12 12:59   ` Ada2005 Carsten Freining
2001-12-12 14:40     ` Ada2005 Peter Hermann
2001-12-12 15:16       ` Ada2005 Ted Dennison
2001-12-12 15:37         ` Ada2005 Larry Kilgallen
2001-12-12 17:49           ` Ada2005 Ted Dennison
2001-12-12 18:02         ` Ada2005 tmoran
2001-12-12 18:17           ` Ada2005 Ted Dennison
2001-12-12 18:31             ` Ada2005 Sergey Koshcheyev
2001-12-12 19:08               ` Ada2005 Ted Dennison
2001-12-12 18:14         ` Mark Lundquist [this message]
2001-12-12 18:40           ` Ada2005 Ted Dennison
2001-12-12 19:12             ` Ada2005 Mark Lundquist
2001-12-12 19:41               ` Ada2005 Ted Dennison
2001-12-13 20:07         ` Ada2005 Ted Dennison
2001-12-14  4:40       ` Ada2005 Patrick Hohmeyer
2001-12-14  9:55         ` Ada2005 Lutz Donnerhacke
2001-12-14 10:36         ` Ada2005 Dmitry A. Kazakov
2001-12-17 18:40         ` Ada2005 Matthew Heaney
2001-12-12 18:04     ` Ada2005 Mark Lundquist
2001-12-12 21:25       ` Ada2005 Mark Lundquist
2001-12-13 18:40         ` Ada2005 Stephen Leake
2001-12-13 19:01           ` Ada2005 Mark Lundquist
2001-12-14 17:17             ` Ada2005 Stephen Leake
2001-12-13  9:11       ` Ada2005 Dmitry A. Kazakov
2001-12-17 17:50         ` Ada2005 Ray Blaak
2001-12-18 11:55           ` Ada2005 Dmitry A. Kazakov
2001-12-18 19:51             ` Ada2005 Ray Blaak
2001-12-19  8:34               ` Ada2005 Dmitry A. Kazakov
2001-12-19 13:30                 ` Ada2005 Mark Lundquist
2001-12-19 18:23                 ` Ada2005 Ray Blaak
2001-12-19 18:20           ` Ada2005 Mark Lundquist
2001-12-19 19:19             ` Ada2005 Ray Blaak
2001-12-20 14:17             ` Ada2005 Dmitry A. Kazakov
2001-12-20 11:24       ` Ada2005 Carsten Freining
2001-12-20 14:27         ` Ada2005 Mark Lundquist
2001-12-20 15:01         ` Ada2005 Matthew Woodcraft
2001-12-20 15:45         ` Ada2005 Mark Lundquist
2001-12-20 16:20           ` Ada2005 Mark Lundquist
2001-12-13 18:13     ` Ada2005 Georg Bauhaus
2001-12-20 16:34 ` Math Libraries (was Re: Ada2005) Marin David Condic
2001-12-20 20:14   ` FGD
2001-12-20 20:34     ` Marin David Condic
2001-12-21 17:21       ` FGD
2001-12-21 18:08         ` Marin David Condic
2001-12-21 19:40           ` tmoran
2001-12-21 19:45             ` Marin David Condic
2001-12-21 20:35             ` Dan Nagle
2001-12-21 20:31           ` Eric Merritt
2001-12-22 16:56           ` Math Update for Ada 2005 Steven Deller
2001-12-23 15:13             ` Robert Dewar
2001-12-23 22:43               ` Brian Rogoff
2001-12-22 21:48           ` Math Libraries (was Re: Ada2005) FGD
2002-01-02 14:20         ` Jacob Sparre Andersen
2001-12-20 23:20   ` Robert C. Leif, Ph.D.
2001-12-21 14:49     ` Marin David Condic
  -- strict thread matches above, loose matches on Subject: below --
2001-12-12 14:05 Ada2005 Peter Hermann
2002-12-17  7:15 Ada2005 Karel Miklav
2002-12-17 11:43 ` Ada2005 Peter Amey
2002-12-17 15:11   ` Ada2005 Robert A Duff
2002-12-17 14:14 ` Ada2005 Ted Dennison
2002-12-17 15:54   ` Ada2005 Peter Hermann
2002-12-18  9:04     ` Ada2005 Anders Wirzenius
2002-12-18 14:48       ` Ada2005 Ted Dennison
2002-12-19  9:01         ` Ada2005 Anders Wirzenius
2005-03-24 14:36 Ada2005 Szymon Guz
2005-03-24 15:30 ` Ada2005 Xaelis
2005-03-24 15:32 ` Ada2005 Larry Kilgallen
replies disabled

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