From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: G. B. Newsgroups: comp.lang.ada Subject: Re: Exception_Occurence and language designers Date: Tue, 5 Dec 2017 20:05:55 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Tue, 5 Dec 2017 20:05:55 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="fac5082076c8a981d64c62ae20fe5db6"; logging-data="7209"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+mK6eM8A5B5V8ADpbV3uE6LNIL1jr4eCc=" User-Agent: NewsTap/5.3.1 (iPhone/iPod Touch) Cancel-Lock: sha1:c+OHqVwHc4d1lGkFkVq2dJXKa80= sha1:XrMHXTLSzPtXf0yCsCeWDpQmZaE= Xref: reader02.eternal-september.org comp.lang.ada:49382 Date: 2017-12-05T20:05:55+00:00 List-Id: Dmitry A. Kazakov 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. > 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? Trying to load exceptions with this seems like misusing a concept.