|
Boost Users : |
From: David Abrahams (dave_at_[hidden])
Date: 2006-09-13 10:17:31
"Sohail Somani" <s.somani_at_[hidden]> writes:
>> -----Original Message-----
>> From: boost-users-bounces_at_[hidden]
>> [mailto:boost-users-bounces_at_[hidden]] On Behalf Of
>> Roman Neuhauser
>> if (!initialized_) {
>> throw new exception("This object is broken.");
>> }
>>
>> That's somewhat like OOP in C, and FMPOV a huge step back.
>
> Actually, even in strict C, good programmers tend to do something like:
>
> T * make_T(T1 p1, T2 p2);
> T1 do_op1(T*this__,...)
>
> And make T opaque, i.e. C++ in C.
Yes. Most of the principles of good C++ design translate back to C
very well. They just take a lot more work.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net