[Exceptional C++ Style] Fw: Item 11: Try and Catch Me

Kevlin Henney kevlin at curbralan.com
Wed Dec 1 10:19:04 EST 2004


In message 
<20041201120854.JWJO1092.aamta05-winn.mailhost.ntl.com@[62.253.162.62]>, 
Ric Parkin <ric.parkin at ntlworld.com> writes
>
>This cuts straight to the heart of why it's often difficult to write a 
>good library - without knowing what is needed in practice, it's 
>tempting to add everything in the theory that it might be useful.

And, as we all know, in theory there is no difference between theory and 
practice, but in practice there is [*].

>A *good* library/class etc, IMO, should actively steer the client into 
>using it in one good way, but not close off  building other ways.

Yes, this whole "an object should be adaptable and (re)usable in any way 
I wish" has been a most damaging mindset.

>In other words Context Matters - it drives the expected usage, which 
>drives the design.

Couldn't agree more :-)

Kevlin

[*] "In theory, theory is the same as practice, but not in practice."
Fnord Bjørnberger
-- 
____________________________________________________________

   Kevlin Henney                   phone:  +44 117 942 2990
   mailto:kevlin at curbralan.com     mobile: +44 7801 073 508
   http://www.curbralan.com        fax:    +44 870 052 2289
   Curbralan: Consultancy + Training + Development + Review
____________________________________________________________




More information about the Effective-cpp mailing list