Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #6155

Re: need argument for try catch blocks

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!goblin2!goblin.stu.neva.ru!plix.pl!newsfeed1.plix.pl!news.nask.pl!news.nask.org.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
From Edek <edek.pienkowski@gmail.com>
Newsgroups comp.lang.c++
Subject Re: need argument for try catch blocks
Date Fri, 03 Jun 2011 21:17:12 +0200
Organization ATMAN - ATM S.A.
Lines 48
Message-ID <isbbvm$io3$1@node2.news.atman.pl> (permalink)
References <b5983f42-b483-48da-bd66-21d4cecd88b1@v31g2000vbs.googlegroups.com> <iro3o6$t1o$1@node2.news.atman.pl> <iro4ma$f08$1@news.ett.com.ua> <cbfa59d5-af09-499d-acd3-6cafef0636ae@t16g2000vbi.googlegroups.com> <irohmf$kuf$1@news.ett.com.ua> <af7aecb0-c862-4103-a538-067d4c6c1bf8@a7g2000vby.googlegroups.com> <78b014fe-3415-41c2-b58b-85afd1e52dbd@l14g2000pro.googlegroups.com> <058239a8-6cb0-4acf-8f99-8f6c2a6ae6d6@gc3g2000vbb.googlegroups.com> <455e3657-9498-48d8-a58d-418cea35b965@f31g2000pri.googlegroups.com> <f91a5af8-2923-44f1-9c8d-2a88d9823936@hd10g2000vbb.googlegroups.com> <00adf30f-8d05-4e9f-9539-a33caa2a40b0@d1g2000yqm.googlegroups.com> <2fa307ee-2252-4505-8053-de385ce71e40@z13g2000yqg.googlegroups.com>
NNTP-Posting-Host 178-37-135-97.adsl.inetia.pl
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace node2.news.atman.pl 1307128630 19203 178.37.135.97 (3 Jun 2011 19:17:10 GMT)
X-Complaints-To usenet@atman.pl
NNTP-Posting-Date Fri, 3 Jun 2011 19:17:10 +0000 (UTC)
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Linux/3.1.0-15 Thunderbird/3.1.0
In-Reply-To <2fa307ee-2252-4505-8053-de385ce71e40@z13g2000yqg.googlegroups.com>
Xref x330-a1.tempe.blueboxinc.net comp.lang.c++:6155

Show key headers only | View raw


> RAII is a paradigm quite unique to C++ and orthogonal to OOP.
> Indeed, most if not all OO programming languages do not even
> support RAII.

OT: What about the with-construct in Python?

with file.open(...) as f:
     ....
     .... any block leave calls f's cleanup func, closing file
     ....

Looks like RAII to me.

>
>> Regardless, C-style programming implies neither of these.
>
> And "C-style" has nothing to do with your problems. Your problems
> are with "crap C++ code" and frustration.
>
>> You are both also talking as if I am introducing the exceptions. Nay!
>> I am trying to handle them! Someone else was responsible for throwing
>> exceptions left and right from c-style code that had a disregard for
>> freeing of resources.
>
> No, that is simply crap /C++/ code and entirely understandable
> frustration with it.

I kind of don't really understand why this frustration leads very often
to being a Best Practises Prophet coupled with blaming everyone around.
Isn't the situation just working with legacy software,
not even crappy one, just the windowz API is such, and other
parts of it remember the old times, and newer parts are written in a
different way and so on, and maybe the "C-Style" colleague is really
just aware of the fact that the software does not rewrite itself?
(don't say this is off-topic - just a different aspect)

> Instead,
> why don't you just rant about "crap code" (which everyone would
> get behind) and leave your colleague and C out of it?

Because that would be more difficult thing to do? :-) Having some
notion of OOP/OOA/RAII/whatever makes one feel soo much better. Calling
code 'crappy' helps too (maybe it is crappy, how can I know).

I also heard macros are really really evil, take MAX(a++), who has not
heard about this one? Never use macros ;-)

Back to comp.lang.c++ | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

need argument for try catch blocks Christopher <cpisz@austin.rr.com> - 2011-05-26 08:20 -0700
  Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-05-26 18:24 +0200
    Re: need argument for try catch blocks Christopher <cpisz@austin.rr.com> - 2011-05-26 10:28 -0700
      Re: need argument for try catch blocks Christopher <cpisz@austin.rr.com> - 2011-05-26 10:31 -0700
      Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-05-26 20:36 +0200
        Re: need argument for try catch blocks Keith H Duggar <duggar@alum.mit.edu> - 2011-05-27 06:10 -0700
          Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-06 04:24 -0500
        Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-06 05:22 -0500
          Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-06-06 21:53 -0700
            Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-06-06 23:48 -0700
              Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-06-07 00:18 -0700
            Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-07 07:13 -0500
              Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-06-07 07:33 -0700
                Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-07 10:08 -0500
                Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-07 10:12 -0500
                Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-06-07 13:59 -0700
                Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-07 16:48 -0500
                Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-07 18:20 -0500
                Re: need argument for try catch blocks Joshua Maurice <joshuamaurice@gmail.com> - 2011-06-07 14:42 -0700
                Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-07 18:13 -0500
                Re: need argument for try catch blocks Joshua Maurice <joshuamaurice@gmail.com> - 2011-06-07 16:21 -0700
                Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-07 19:13 -0500
                Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-08 07:07 -0500
                Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-08 07:12 -0500
                Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-09 07:19 -0500
                Re: need argument for try catch blocks "io_x" <a@b.c.invalid> - 2011-06-09 21:00 +0200
                Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-08 15:40 -0500
                Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-08 16:07 -0500
                Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-09 10:21 -0500
  Re: need argument for try catch blocks Juha Nieminen <nospam@thanks.invalid> - 2011-05-27 06:40 +0000
  Re: need argument for try catch blocks Edek <edek.pieITAKNIECZYTAM@gmail.com> - 2011-05-27 14:05 +0200
    Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-05-27 14:16 +0200
      Re: need argument for try catch blocks Edek <edek.pieITAKNIECZYTAM@gmail.com> - 2011-05-27 14:48 +0200
        Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-05-27 15:10 +0200
          Re: need argument for try catch blocks Edek <edek.pieITAKNIECZYTAM@gmail.com> - 2011-05-27 15:54 +0200
            Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-05-27 16:13 +0200
          Re: need argument for try catch blocks "Fred Zwarts" <F.Zwarts@KVI.nl> - 2011-05-30 09:56 +0200
            Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-05-30 10:22 +0200
      Re: need argument for try catch blocks Christopher <cpisz@austin.rr.com> - 2011-05-27 07:43 -0700
        Re: need argument for try catch blocks Paavo Helde <myfirstname@osa.pri.ee> - 2011-05-27 10:19 -0500
        Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-05-27 17:58 +0200
          Re: need argument for try catch blocks Keith H Duggar <duggar@alum.mit.edu> - 2011-05-30 09:43 -0700
            Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-05-30 11:58 -0700
            Re: need argument for try catch blocks Christopher <cpisz@austin.rr.com> - 2011-05-31 08:57 -0700
              Re: need argument for try catch blocks Keith H Duggar <duggar@alum.mit.edu> - 2011-05-31 13:33 -0700
                Re: need argument for try catch blocks Ian Collins <ian-news@hotmail.com> - 2011-06-01 09:03 +1200
                Re: need argument for try catch blocks Keith H Duggar <duggar@alum.mit.edu> - 2011-05-31 14:57 -0700
                Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-06-01 02:06 +0200
                Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-05-31 16:32 -0700
                Re: need argument for try catch blocks Christopher <cpisz@austin.rr.com> - 2011-06-01 11:42 -0700
                Re: need argument for try catch blocks Keith H Duggar <duggar@alum.mit.edu> - 2011-06-02 16:01 -0700
                Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-06-03 04:27 -0700
                Re: need argument for try catch blocks Christopher <cpisz@austin.rr.com> - 2011-06-03 07:39 -0700
                Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-06-03 10:43 -0700
                Re: need argument for try catch blocks Keith H Duggar <duggar@alum.mit.edu> - 2011-06-03 11:31 -0700
                Re: need argument for try catch blocks Christopher <cpisz@austin.rr.com> - 2011-06-03 12:14 -0700
                Re: need argument for try catch blocks Leigh Johnston <leigh@i42.co.uk> - 2011-06-03 21:22 +0100
                Re: need argument for try catch blocks "Balog Pal" <pasa@lib.hu> - 2011-06-04 17:30 +0200
                Re: need argument for try catch blocks Keith H Duggar <duggar@alum.mit.edu> - 2011-06-04 15:16 -0700
                Re: need argument for try catch blocks Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-06-11 10:22 +0000
                Re: need argument for try catch blocks Edek <edek.pienkowski@gmail.com> - 2011-06-03 21:17 +0200
                Re: need argument for try catch blocks Joshua Maurice <joshuamaurice@gmail.com> - 2011-06-03 18:24 -0700
                Re: need argument for try catch blocks Edek <edek.pienkowski@gmail.com> - 2011-06-04 19:34 +0200
                Re: need argument for try catch blocks Joshua Maurice <joshuamaurice@gmail.com> - 2011-06-04 19:39 -0700
                Re: need argument for try catch blocks Keith H Duggar <duggar@alum.mit.edu> - 2011-06-04 07:22 -0700
                Re: need argument for try catch blocks Edek <edek.pienkowski@gmail.com> - 2011-06-04 19:24 +0200
                Re: need argument for try catch blocks Christopher <cpisz@austin.rr.com> - 2011-06-03 07:51 -0700
                Re: need argument for try catch blocks "Alf P. Steinbach /Usenet" <alf.p.steinbach+usenet@gmail.com> - 2011-06-03 20:57 +0200
                Re: need argument for try catch blocks Dombo <dombo@disposable.invalid> - 2011-06-05 13:29 +0200
        Re: need argument for try catch blocks Edek <edek.pieITAKNIECZYTAM@gmail.com> - 2011-05-27 19:01 +0200
          Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-05-31 17:13 -0700
            Re: need argument for try catch blocks Edek <edek.pienkowski@gmail.com> - 2011-06-03 16:04 +0200
              Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-06-03 09:44 -0700
                Re: need argument for try catch blocks Edek <edek.pienkowski@gmail.com> - 2011-06-03 19:04 +0200
                Re: need argument for try catch blocks Öö Tiib <ootiib@hot.ee> - 2011-06-04 07:05 -0700
      Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-06 05:15 -0500
  Re: need argument for try catch blocks "MikeP" <mp011011@some.org> - 2011-06-06 04:43 -0500

csiph-web