9fans archive / 2002 / 11 / 461 prev next
From: Roman V. Shaposhnick <vugluskr@uni...>
Subject: how to avoid a memset() optimization
Date: Thu, 21 Nov 2002 23:55:48 +0300
[ DISCLAIMER: sorry for wide distribution, but I had no luck contacting
Douglas at his e-mail ].
On Wed, Nov 20, 2002 at 09:47:53AM +0000, Douglas A. Gwyn wrote:
> 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.
Oh, that's for sure. I guess I just have a "sausage
problem" with C++ ( you, know, people who make 'em,
can't eat 'em ) since I've been involved in C++ compiler
development for quite some time. Since then, I'm
a pure C diehard but I miss very basic functionality
of what was known as "C with classes" from time to time.
> 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.
That'll be wonderful. Thank you.
Thanks,
Roman.