[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: Why is C so popular?

On Thu, Aug 28, 2003 at 05:08:08AM +0200, Thomas Krennwallner wrote:

> Hi!
> On Wed Aug 27, 2003 at 07:12:35PM -0400, Paul M Foster wrote:
> > and others. In the last few years, I switched over to C++. I have never 
> > taken so long to write programs in my entire life as when I was coding 
> > in C++. I spent far more time in design, and far more time debugging 
> > than I ever had in C. So I went back to C. Now my C code looks like 
> > a C++ programmer wrote it. But it's quicker to write.
> > 
> > Plus, I don't and never have liked the iostreams. They're clunky 
> > compared to printf() for most things. And exceptions are a pain in the 
> > butt, and no one seems to have a definitive answer on when to and when 
> > not to use them.
> > 
> > Classes I love and inheritance I liked. But the public/private/protected 
> > distinction in inherited classes is a pain to design and maintain. Plus 
> > vtables and virtual classes and functions. And friend classes/functions. 
> > C++ was supposed to allow a lot of code reuse. I haven't seen it, and I 
> > don't think any language will ever practically deliver it.
> Go and read "Design Patterns: Elements Of Reusable Object-Oriented
> Software"[1]. It's THE book for developers who think like you. He, I was
> in your group, but after reading this book I was enlightened ;-)

I have it on my shelf and have used it from time to time. Good book. But
it contains a lot of examples of exactly what I'm talking about. "Okay,
so you want the interface to this class to be defined by this other
class, which...." Argh.

I hope you didn't mention that book to make a point about reusable code, 
because it doesn't present any reusable code. "Patterns" yes. "Reusable 
code" no.


Reply to: