From: jsa@alexandria.organon.com (Jon S Anthony)
Subject: Re: Ada and robots
Date: 1997/06/27
Date: 1997-06-27T00:00:00+00:00 [thread overview]
Message-ID: <JSA.97Jun27151703@alexandria.organon.com> (raw)
In-Reply-To: 9706262213.AA13647@stealth.ctron.com
In article <9706262213.AA13647@stealth.ctron.com> Huy Vo <vo@CTRON.COM> writes:
> >> You rely on the runtime system telling you what line it fails?
> >
> >No. All such stuff should be isolated with a non-lowlevel interface.
> >Inside the implementation exception handler(s) take the appropriate
> >action. Outside, no one cares or needs to care.
>
>
> Someone has to care, Jon. Because if you dynamically allocate memory
> at 101 places in your 100K lines of code and only one of
> the allocations failed, you really want to know which one failed.
Hardly. In general, that will not be at all informative. The problem
will have been caused by a memory _leak_ - for which, who's attempting
final allocation is completely irrelevant.
> As an application programmer what would you do? As a compiler writer
> that has to provide a default handler for this type of situation
> what would you do?
>
> In C, it's as simple as
>
> if (!(cp =malloc(BIG_CHUNK)) {
> fprintf(stderr, "Buy some more ram, i died at line %d\n", __LINE__);
> exit(1);
> }
This is a joke, right? Anyone I ever see writing god-awful code like
the above would get sent back for some remedial lessons.
> Show me your code.
Equivalent lousy Ada code:
exception
when E : Storage_Error =>
Put_Line(
Exception_Name(E) & ": " & Exception_Information(E) &
"In function Parser.Parse_Derived_Type_Def.Array_Type," &
when attempting to allocate node for anonymous array type." );
/Jon
--
Jon Anthony
OMI, Belmont, MA 02178
617.484.3383
"Nightmares - Ha! The way my life's been going lately,
Who'd notice?" -- Londo Mollari
next prev parent reply other threads:[~1997-06-27 0:00 UTC|newest]
Thread overview: 132+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-06-26 0:00 Ada and robots Huy Vo
1997-06-27 0:00 ` nma123
1997-06-27 0:00 ` Wes Groleau
1997-06-27 0:00 ` Jon S Anthony [this message]
1997-06-27 0:00 ` Alan Brain
1997-06-27 0:00 ` Stephen Leake
1997-06-27 0:00 ` Wes Groleau
1997-06-27 0:00 ` Richard A. O'Keefe
-- strict thread matches above, loose matches on Subject: below --
1997-07-02 0:00 Huy Vo
1997-07-04 0:00 ` Richard A. O'Keefe
1997-07-01 0:00 Huy Vo
1997-07-02 0:00 ` Wes Groleau
1997-06-30 0:00 Huy Vo
1997-07-01 0:00 ` Alan Brain
1997-07-11 0:00 ` Will Rose
1997-07-02 0:00 ` Mattias Sj�sv�rd
[not found] <867541382.23405@dejanews.com>
1997-06-29 0:00 ` John Howard
1997-06-24 0:00 Huy Vo
1997-06-25 0:00 ` Jon S Anthony
1997-06-25 0:00 ` Dale Stanbrough
1997-06-25 0:00 ` Alan Brain
1997-06-25 0:00 ` Wes Groleau
1997-06-26 0:00 ` Ken Garlington
1997-07-01 0:00 ` Tom Moran
1997-06-20 0:00 Huy Vo
1997-06-23 0:00 ` Jon S Anthony
1997-06-19 0:00 ada " Jon S Anthony
1997-06-19 0:00 ` Brian Rogoff
1997-06-20 0:00 ` Jon S Anthony
1997-06-22 0:00 ` John G. Volan
1997-06-25 0:00 ` Richard A. O'Keefe
1997-06-23 0:00 ` Robert Dewar
1997-06-24 0:00 ` Brian Rogoff
1997-06-16 0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-06-17 0:00 ` Joe Gwinn
1997-06-18 0:00 ` Jon S Anthony
1997-06-18 0:00 ` Brian Rogoff
1997-06-20 0:00 ` Robert Dewar
1997-06-23 0:00 ` Richard Kenner
1997-06-23 0:00 ` Robert Dewar
1997-06-23 0:00 ` Geert Bosch
1997-07-02 0:00 ` Robert Dewar
1997-06-25 0:00 ` Will Rose
1997-06-25 0:00 ` Jonathan Guthrie
1997-06-21 0:00 ` Nick Roberts
1997-06-16 0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-06-12 0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-06-09 0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-06-05 0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-06-05 0:00 Marin David Condic, 561.796.8997, M/S 731-93
1997-06-09 0:00 ` Jerry Petrey
1997-06-10 0:00 ` Alan Brain
1997-06-10 0:00 ` Joe Gwinn
1997-06-11 0:00 ` Alan Brain
1997-06-11 0:00 ` Joe Gwinn
1997-06-11 0:00 ` Spam Hater
1997-06-11 0:00 ` Robert Dewar
1997-06-11 0:00 ` Samuel Mize
1997-06-13 0:00 ` Erik Magnuson
1997-06-17 0:00 ` Joe Gwinn
1997-06-18 0:00 ` Jon S Anthony
1997-06-19 0:00 ` Jonathan Guthrie
1997-06-20 0:00 ` Robert Dewar
1997-05-28 0:00 John Bohn
1997-05-29 0:00 ` Stephen Leake
1997-05-29 0:00 ` Michael F Brenner
1997-05-30 0:00 ` John Cook
1997-05-30 0:00 ` Tom Moran
1997-06-01 0:00 ` Dale Stanbrough
1997-06-02 0:00 ` John G. Volan
[not found] ` <5mv984$7kn@news.emi.com>
1997-06-03 0:00 ` Martin A. Stembel
1997-06-03 0:00 ` Joe Gwinn
1997-06-04 0:00 ` Pat Rogers
1997-06-05 0:00 ` Joe Gwinn
1997-06-14 0:00 ` Robert Dewar
1997-06-16 0:00 ` Ken Garlington
1997-06-16 0:00 ` Robert Dewar
1997-06-17 0:00 ` Joe Gwinn
1997-06-28 0:00 ` Mike Stark
1997-07-03 0:00 ` Joe Gwinn
1997-06-04 0:00 ` John G. Volan
1997-06-05 0:00 ` Joe Gwinn
1997-06-14 0:00 ` Robert Dewar
1997-06-17 0:00 ` Joe Gwinn
1997-07-03 0:00 ` Shmuel (Seymour J.) Metz
[not found] ` <9706052229.AA29554@jaguar.nmc.ed.ray.com>
1997-06-06 0:00 ` John G. Volan
1997-06-07 0:00 ` RC
1997-06-09 0:00 ` Joe Gwinn
1997-06-05 0:00 ` Jon S Anthony
1997-06-05 0:00 ` Joe Gwinn
1997-06-14 0:00 ` Robert Dewar
1997-06-10 0:00 ` Robert Dewar
1997-06-10 0:00 ` Joe Gwinn
1997-06-11 0:00 ` Robert Dewar
1997-06-12 0:00 ` George Haddad
1997-06-16 0:00 ` Matthew S. Whiting
1997-06-17 0:00 ` Stephen Leake
1997-06-17 0:00 ` Robert A Duff
1997-06-20 0:00 ` jim granville
1997-06-21 0:00 ` Robert Dewar
1997-06-29 0:00 ` Matthew Heaney
1997-07-03 0:00 ` Shmuel (Seymour J.) Metz
1997-07-13 0:00 ` Robert Dewar
1997-06-17 0:00 ` Jon S Anthony
1997-06-17 0:00 ` Matthew S. Whiting
1997-06-18 0:00 ` Robert A Duff
1997-06-18 0:00 ` Jon S Anthony
1997-06-22 0:00 ` John G. Volan
1997-06-18 0:00 ` Samuel Mize
1997-06-18 0:00 ` Matthew S. Whiting
1997-06-17 0:00 ` Samuel Mize
1997-06-18 0:00 ` Steve O'Neill
1997-06-19 0:00 ` Anonymous
1997-06-19 0:00 ` Kenneth W. Sodemann
1997-06-20 0:00 ` Stephen Leake
1997-06-20 0:00 ` Robert Dewar
1997-06-17 0:00 ` Robert Dewar
1997-06-17 0:00 ` Robert A Duff
1997-06-18 0:00 ` Ken Garlington
1997-07-17 0:00 ` Shmuel (Seymour J.) Metz
1997-06-20 0:00 ` Robert Dewar
1997-06-20 0:00 ` Adam Beneschan
1997-06-04 0:00 ` RC
1997-06-04 0:00 ` Larry Kilgallen
1997-06-04 0:00 ` John G. Volan
1997-06-05 0:00 ` Jon S Anthony
1997-06-02 0:00 ` Nick Roberts
1997-06-04 0:00 ` Jan Galkowski
1997-06-05 0:00 ` Albert K. Lee
1997-06-06 0:00 ` dana
1997-06-07 0:00 ` John G. Volan
1997-06-10 0:00 ` dana
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox