2 Nov 00:30
Re: C++
<olafBuddenhagen <at> gmx.net>
2009-11-01 23:30:11 GMT
2009-11-01 23:30:11 GMT
Hi, On Wed, Oct 28, 2009 at 10:53:56PM +0100, Bas Wijnen wrote: > On Tue, Oct 27, 2009 at 09:48:17AM +0100, olafBuddenhagen <at> gmx.net > wrote: > Being able to make classes and do inheritance is definitely a Good > Thing, for which there isn't a proper alternative in C, IMO. I never worked on any code where inheritence was central enough to warrant an extra language feature... There might be situations where it is indeed (GUI programming is typically cited as the standard example) -- but kernel hacking is definitely not one of them. > In C, you would need to add the parent class as a first member, which > would lead to variable.parent.parent.foo and variable.parent.bar. If > what you mean is inheritance (so top is just a specialized version of > middle, which is a specialized version of base), then all those parent > references are not adding information, but instead only obscuring > things. No, they are definitely *not* obscuring things. They make things more explicit. Whether it is good or bad is a different question. (I for my part consider it good in most cases.) > > The fact that it's possible to use a certain subset that is pretty > > elegant and consistent -- called C -- doesn't change the fact that > > C++ as a language is dead ugly. > > This subset isn't exactly C. It's C with inheritance, member(Continue reading)
> Though. unfourtunately, I haven't yet run into an audience who know
> for sure what a kernel is, to tell nothing about FUSE or translators
>
RSS Feed