Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] using rusage
- Date: Mon, 23 Jun 2008 10:24:21 +0900
- From: "Josh Glover" <jmglov@example.com>
- Subject: Re: [tlug] using rusage
- References: <20080619035005.GB11561@lucky.cynic.net> <20080619114706.GA15943@lucky.cynic.net> <d8fcc0800806191638u4afa8ac9v62409fe0305ad233@mail.gmail.com> <20080620001947.GD19792@lucky.cynic.net> <d8fcc0800806200039t32a6fe51h11ad9b0bec24037e@mail.gmail.com> <20080622003114.GI7494@lucky.cynic.net> <d8fcc0800806211748y4bf4783cla401afe0df23b04a@mail.gmail.com> <20080622043337.GC9873@lucky.cynic.net> <d8fcc0800806221604i19e81180r9e50256dd6a273aa@mail.gmail.com> <20080623004851.GL1177@lucky.cynic.net>
2008/6/23 Curt Sampson <cjs@example.com>: > Perhaps you really meant, "defensively within reason," > for example, by not doing a readback and compare of every block you > write to the disk, in which case we would be in agreement that you need > to strike a balance. OK, we are in agreement, then. > You might also have a look at Erlang, where it's common practice not to > bother with error-checking code, and "let it fail" is the usual mode of > operation. I have used Erlang some, and I love it, but... >> In C, you just have to accept that you are going to need some guard >> code. You should certainly factor that guard code well; macros can be >> your friend here. > > Yup. Most systems programming is still done in C, with C++ and Java a distant second. Obviously, Erlang is heavily used by Ericsson for their telecom systems programming. When systems programmers have a choice of language, they should obviously choose the one that allows them to solve the problem with the fewest lines of clearly written, well factored code possible. However, systems programmers often do not have a choice, or do not have the management support to make a choice. > Right. That is a cost-benefit decision where in most cases I would > agree with you. The difference is that I looked at it explicitly from a > cost-benefit point of view, and recognised that that's a trade-off I'm > making. No, the difference is that you explicitly stated that it is a cost-benefit situation, whereas I assumed that anyone with a brain would realise that *every* decision is, whether you do the analysis or not. Your point is well-taken: guard code can be taken to an extreme. In fact, I myself have argued recently and vociferously that we should be letting Perl throw run-time errors in almost all cases, since the vast majority of the code we write cannot reasonably recover from a failure, and an unhandled runtime error provides a nice stack trace, which is what we need to debug errors anyway. -- Cheers, Josh
- References:
- Re: [tlug] using rusage
- From: Curt Sampson
- Re: [tlug] using rusage
- From: Curt Sampson
- Re: [tlug] using rusage
- From: Josh Glover
- Re: [tlug] using rusage
- From: Curt Sampson
- Re: [tlug] using rusage
- From: Josh Glover
- Re: [tlug] using rusage
- From: Curt Sampson
- Re: [tlug] using rusage
- From: Josh Glover
- Re: [tlug] using rusage
- From: Curt Sampson
- Re: [tlug] using rusage
- From: Josh Glover
- Re: [tlug] using rusage
- From: Curt Sampson
Home | Main Index | Thread Index
- Prev by Date: Re: [OT] Re: [tlug] Looking for Mailman expert
- Next by Date: Re: [tlug] using rusage
- Previous by thread: Re: [tlug] using rusage
- Next by thread: Re: [tlug] using rusage
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links