comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Exception_Occurence and language designers
Date: Tue, 5 Dec 2017 21:48:36 +0100
Date: 2017-12-05T21:48:36+01:00	[thread overview]
Message-ID: <p070n2$1qei$1@gioia.aioe.org> (raw)
In-Reply-To: p06u73$719$1@dont-email.me

On 2017-12-05 21:05, G. B. wrote:
> Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> wrote:
>> On 05/12/2017 01:16, G. B. wrote:
>>
>>> How about this: the idea of creating normal,
>>> typed objects as payload of wild jumps in
>>> abnormal (exceptional) situations is rather optimistic.
>>
>> The problem is upward closures. (...):
>>
>> This works in C++ because there all types are global.
> 
> Creating objects in exceptional situations,
> if meaningfully possible at all, will work in
> C++ as long as the programmer manages
> to copy the closure of data into the thrown
> object, IINM.

In Ada it necessarily becomes type closure. No way you could marry 
static typing with that.

>>   Root_Exception_Attachment (...)
>>
>> Apart from being not very useful and requiring a lot of overhead
> 
> If non-local jumps should pass information up the
> call chain, then why not ask for a mechanism that
> does just that?

Fine, if you manage to express that mechanism in terms of static strong 
typing, be my guest.

> Trying to load exceptions with this seems like misusing a concept.

Which is why Ada 95 didn't do that. Exception_Occurrence is a plain 
type, no magic.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  reply	other threads:[~2017-12-05 20:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04 11:17 Exception_Occurence and language designers Mehdi Saada
2017-12-04 12:32 ` Simon Wright
2017-12-04 14:00   ` Mehdi Saada
2017-12-04 14:31     ` Dmitry A. Kazakov
2017-12-04 20:27       ` G. B.
2017-12-04 20:55         ` Dmitry A. Kazakov
2017-12-05  0:16           ` G. B.
2017-12-05  8:35             ` Dmitry A. Kazakov
2017-12-05 20:05               ` G. B.
2017-12-05 20:48                 ` Dmitry A. Kazakov [this message]
2017-12-04 17:43 ` Jeffrey R. Carter
replies disabled

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