🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.objects
Article #14987

Re: Wyj±tki w konstruktorze

#14987
From: A.L.
Date: Sun, 27 Aug 2006 14:31
51 lines
3311 bytes
On Sun, 27 Aug 2006 11:51:39 +0000 (UTC), Jacek
<nobody@nospamkinga.cyf-kr.edu.pl> wrote:

>Piotr Dembiński <pdemb@gazeta.pl> napisal:
>> A taki Windows NT jest w całości napisany w C++.
>
>Wybacz, ale to slaby argument. CP/M byl pisany w asemblerze,
>ale to nie powod, by ciagle w nim pisac ;)
>
>Caly podwatek to dylemat pomiedzy doskonaloscia techniczna
>(tu SvS i Ty) oraz ekonomiczna (A.L.). Mam wrazenie, ze jednak
>pieniadze zadecyduja.

Doskonalosc techniczna" oddaje najlepiej nastepujacy cytat,
potwierdzajacy to co od dawna wiadomo, a mianowicie ze C++ powstaje
"metoda alchemiczna": Wkladamy troche g... do sloika i potrzasamy.
Potem patrzymy co wyszlo. Jak rowneiz to ze tworcy jezyka nie sa w
stanie zrozumeic co robia. Widac jest za trudny dla nich.

Cytat:

""Hmm," you might wonder, "then why does this exception safety
loophole exist at all? Why doesn't the standard just prevent the
problem by requiring compilers to Do The Right Thing when it comes
to cleanup?"

The basic answer is that it wasn't noticed, and even now that it has
been noticed it might not be desirable to fix it. The C++ standard
allows the compiler some latitude with the order of evaluation of
expressions because this allows the compiler to perform
optimizations that might not otherwise be possible. To permit this,
the expression evaluation rules are specified in a way that is not
exception-safe, and so if you want to write exception-safe code you
need to know about, and avoid, these cases. (See below for how best
to do this.)

Remember that C++ exception safety in general has not been well
understood until fairly recently (namely the summer of 1997, just
months before the standard was completed). Even so, the committee
managed to add exception safety guarantees to the standard library,
albeit necessarily at the eleventh hour in the last two meetings
before the standard was cast in stone; many of the guarantees were
added literally days before the concrete set. The problem with
new-expressions has now been noticed, but for the reasons above the
committee will have to decide whether the hole should be "fixed" or
whether it should continue to be allowed in the name of compiler
optimization flexibility..."

Ja dziekuje. Ja postoje.

A.L.
Technical Details
Message-ID: <i0b3f25nvj9fr6ats7kjvntr20g3gsruiu@4ax.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!newsfeed.pionier.net.pl!newshub.sdsu.edu!sn-xt-sjc-03!sn-xt-sjc-01!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail
References: <1156145142.606030.39100@m73g2000cwd.googlegroups.com> <ece4m4$88j$1@inews.gazeta.pl> <ecesvp$k3h$3@kujawiak.man.lodz.pl> <eci6qt$h30$1@inews.gazeta.pl> <ch3qe25s17dild5v1m7ei4c43b0n2tka4e@4ax.com> <ecm9eg$g71$4@kujawiak.man.lodz.pl> <a1l0f215rtj4kj6o35sora0fd2bl0qn0k9@4ax.com> <87lkpbs6yq.fsf@hector.domek> <ecs10b$795$1@srv.cyf-kr.edu.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!newsfeed.pionier.net.pl!newshub.sdsu.edu!sn-xt-sjc-03!sn-xt-sjc-01!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail
From: A.L. <alewando@fala2005.com>
Newsgroups: pl.comp.objects
Subject: Re: Wyj±tki w konstruktorze
Date: Sun, 27 Aug 2006 09:31:37 -0500
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <i0b3f25nvj9fr6ats7kjvntr20g3gsruiu@4ax.com>
References: <1156145142.606030.39100@m73g2000cwd.googlegroups.com> <ece4m4$88j$1@inews.gazeta.pl> <ecesvp$k3h$3@kujawiak.man.lodz.pl> <eci6qt$h30$1@inews.gazeta.pl> <ch3qe25s17dild5v1m7ei4c43b0n2tka4e@4ax.com> <ecm9eg$g71$4@kujawiak.man.lodz.pl> <a1l0f215rtj4kj6o35sora0fd2bl0qn0k9@4ax.com> <87lkpbs6yq.fsf@hector.domek> <ecs10b$795$1@srv.cyf-kr.edu.pl>
X-Newsreader: Forte Agent 3.1/32.783
MIME-Version: 1.0
X-Complaints-To: abuse@supernews.com
Lines: 52
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit