From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: "Douglas A. Gwyn" Message-ID: <3DDB05A3.1080304@null.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit References: <38aa463bafe23035decff6b0364f7553@plan9.bell-labs.com>, <20021119103808.B13548@unicorn.math.spbu.ru> Subject: Re: [9fans] how to avoid a memset() optimization Date: Wed, 20 Nov 2002 09:47:53 +0000 Topicbox-Message-UUID: 248c4c98-eacb-11e9-9e20-41e7f4b1d025 Roman V. Shaposhnick wrote: > C++ style exceptions are nice, but easily abused, > and I haven't seen any way of emulating then in pure C. Nearly any programming facility can be abused. Of course C++ exceptions cannot be exactly emulated in C, because there is no possible way to tie the handling to the type as in C++. However, similar facilities can be built on top of setjmp/longjmp, and several people have done so. Send me e-mail at my work address and I'll be happy to send you my implementation which I call the "Ex" package.