Thread (11 messages) flat view 11 messages, 8 authors, 2016-06-15

Re: [OT] Re: C++ *for Git*

From: Marco Costalba <hidden>
Date: 2016-06-15 22:43:36

On 9/23/07, Nicolas Pitre [off-list ref] wrote:
You must have misunderstood.  Why?  The linux kernel is itself very
heavily "object oriented" already, even if it is written in C.  You
don't need C++ for that.
Yes it's true, you don't need it. Object oriented in C is achived
using function pointers.

In C you fill a struct of function pointers with proper values instead
of inherithing from an (abstract) base class as you would do in C++.
The results are more or less the same modulo some type safe.


Marco
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help