Re: linux headers and C+-+-

Steve Underwood (steveu@netpage.com.hk)
Wed, 07 Jul 1999 01:14:26 +0000


Alan Cox wrote:

> > from "USB" and "modem". And the like with
> > USB soundcards, etc. Then you could
>
> Unfortunately planed earth doesn't work like that. USB sound is very different
> at the low level to conventional sound cards. At the higher level well gee we
> inherit the behaviour from the sound core and from the OSS layer if we want.
>
> > realize that, if Linux was a truly an OO OS,
> > the USB should be realized months ago...
>
> No. I have a big problem with people who have read too much and hacked
> too little. As Fred Brooks says - there is no silver bullet. Having worked
> with real OO languages like smalltalk C is more of a waterpistol anyway.

C and C+-+- are both good for some things, but what I want most of the time is C+-.
I'd like a C with the C+-+- features that aid clarity, and none of the stuff that
deprecates the developer's tight control of things. Sure you can write pure C with
a C+-+- compiler - a simple trick used to increase apparent productivity in places
that measure people in KLOCs. In practice it never works out too well, and you
always end up with some C+-+- baggage in the result. I think disdain for some of the
excesses of C+-+- has made most low level developers shy away from the greater
clarity a half way house language might give.

> Linux is text book good OO. There is little multiple inheritance, there is
> very clean modularity. At the same time you don't need a VRML 3D class
> browsers to view the class structure.

Eh? Most of the OO test books I've seen give you the idea that a programmer's life
consists mostly of multiply inheriting. In practice I have never multiply
inherited. In fact, I've never received a single lawyer's letter telling me of just
one inheritance!

My very first job way in an object oriented hardware development environment -
suggest a good idea and everyone objected to it!

> People with strange naive ideas that somehow C gives you instant USB need
> to write more low level code. Unfortunately many people who write text books
> write the books before they do that, or because they can't.

Here, here. Those who can do; those who can't teach. That's why so many people are
taught some damned strange things.

> > suited than C (how could you do multiple
> > inheritance in C, without writing very
> > unreadable code?), but you know, you
>
> Function arrays. BTW Multiple inheritance is seen as a terrible evil sin
> by OO purists, because your programs just turn to crud once you start abusing it

Let's cook up a class. Eye of toad, ear of bat, ...... Multiple inheritance has a
tendancy to sum all the worst, rather than all the best, of the things inherited
from. I guess it doesn't have to be that way, but it seems to be "standard
practice".

> Alan

Steve

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/