From -3410329099942513478
X-Google-Thread: f78e5,ccf6a146f69dd0fc
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,UTF8
Path: g2news1.google.com!news4.google.com!news.glorb.com!news.alt.net!comp-std-cpp-robomod!not-for-mail
From: ravinderthakur@gmail.com
Newsgroups: comp.std.c++
Subject: Re: Legacy issues:was:Re: standardizing the exception handling mechanism across platform/compilers
Date: 23 Aug 2005 02:30:02 GMT
Organization: http://groups.google.com
Lines: 84
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <1124718740.660393.208780@o13g2000cwo.googlegroups.com>
References: <1123763925.850895.253360@f14g2000cwb.googlegroups.com>
   <42feece5$0$16078$892e7fe2@authen.white.readfreenews.net>
   <upssemkjo.fsf@boost-consulting.com>
   <430202d3$0$83690$892e7fe2@authen.white.readfreenews.net>
   <7NpMe.1913$r54.162@newssvr19.news.prodigy.com>
   <1124226617.637407.216790@g49g2000cwa.googlegroups.com>
   <ddup08$2vs$1@new-usenet.uk.sun.com>
   <Su2Ne.8$Ux3.6@newssvr21.news.prodigy.com>
   <hvSdncsz9YoE9pveRVn-jQ@speakeasy.net>
   <9vednf6yF4qWi5reRVn-hA@giganews.com>
   <CI-dnYbCl5arsZTeRVn-sA@speakeasy.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Return-Path: <devnull@stump.algebra.com>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
Delivered-To: std-c++@ucar.edu
X-Trace: posting.google.com 1124718746 7082 127.0.0.1 (22 Aug 2005 13:52:26 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 22 Aug 2005 13:52:26 +0000 (UTC)
User-Agent: G2/0.2
Complaints-To: groups-abuse@google.com
Injection-Info: o13g2000cwo.googlegroups.com; posting-host=203.200.99.68;
   posting-account=viEmQA0AAABsS7Ff_u_OfufETJdp8HWs
X-Virus-Scanned: amavisd-new at ucar.edu
X-MIME-Autoconverted: from quoted-printable to 8bit by mailman.ucar.edu id j7MDr0NC014214
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
X-Virus-Scanned: amavisd-new at cs.mu.OZ.AU
Xref: g2news1.google.com comp.std.c++:1901

hi all,

first of all a big apology for not being able to keep myself in sync
with my posting. i was a bit involved in fixing some impossible to find
bugs in some software 


now back onto my original posting a few clarifications are in order:


what i was suggesting was to standardize in some way the runtime
behavior or c++ exceptions rather than the compile time behavior of
c++. to see the motivation for the same lets see how a large part of
the software development occurs:

most of the applications being developed try to reuse the existing code
and the ways of
reuse is either at the source code level or to use the code at the
binary level (aka the library file approach.).

one the end of the library vendor, he cannot throw exceptions from the
functions exposed in the library files because the runtime model of the
exceptions is not standarized across the compilers/platforms.

eg. given below is the link to some of the issues forbidding the use of
exception from real world experience:
http://www.mactech.com/articles/mactech/Vol.15/15.01/C++ExceptionsMacOSCode/


thus if that library is being developed in say , msvc then the
exceptions thrown by that compiler cannot be catched by the compiler
from say borland.

as a result the library vendor who wants to create a portable cannot
possibly use the
exception mechanism.


now at the client side the application developer just writes the code
and uses this library in his project. so as  a result a portion of his
code handles exception (eg. the one using stl ) and the other portion
of his code works on just the plain c style error handling.

i have the feeling that standardizing the runtime behaviour of
excepition handling will not give the freedom to the compiler vendors
to create the most efficent code for exceptions among other issues with
the purists. but excpetions occours only at exceptional conditions so
even if some inefficient code executes rarely, the overall performance
will not be hit. The reallity of the software development is that the
software development is that most of the projects are off  target and
are of poor quality not due to their runtime performance but due to the
large number of bugs with them.


as mentioned by experts above, i know that this standardization could
break the billions of line of existing code among but other problems
but we can also gain big benefits in the long run.


at the minimum side we can ensure that the runtime model of the
exceptions handling allows
one or many of the following:

a)ensure that the exceptions are compiler independent so that the
library created by one compiler and throwing exceptions can be used by
the applications being developed by other compiler.
 b)create a basic skeleton of the exception object that contains the
basic information that
can convey the problem to the user/developer.
c)provide the portability of exceptions for the runtime code as well
rather than just the compile time code.



thanks
rt


---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



