[openbeosnetteam] Re: PPP: dial-on-demand

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Fri, 04 Jul 2003 04:39:25 +0200 CEST

"Waldemar Kornewald" <Waldemar.Kornewald@xxxxxx> wrote:
> That is very very true. Therefore we should try to make a C++ 
> netstack.
> I hear some people cry "no, some will not like C++", but maintaining,
> understanding and reading the code is far easier than with any C 
> stack.
> Nathan's netstack can be much cleaner than any C stack, IMHO.
> Putting everything into small objects and assigning good names and 
> using
> inheritance would result in a powerful stack.
> 
> One reason for C++ is that C looks more cryptic than C++.
> ... 
> > BTW, did you give a look at first draft ppp & serial_ppp code that 
> > was
> > included in the old net_kit backup
> > http://philippe.houdoin.free.fr/phil/beos/openbeos/network_kit/
> > obos_net_kit-20020822.zip ?
> Yes, but I must admit I do not like it. :)
> The C interface looks too complicated and ugly. This does not mean 
> the code
> is bad, but I do not like reading C.

As I already tried to explain, C++ in the kernel is *not* usable that 
way now until we have real shared libraries, at least not if you want 
to implement the net stack as a module.
You can't export a C++ API in modules, and therefore, you can't inherit 
from a class defined in a module - C++ can currently only be used per 
module, but not really inter-modular :)

Furthermore, with a C API you can implement your modules in both, C and 
C++ - with a C++ API you force all add-ons to be written in C++, and 
that's certainly something I don't want to do at this point.

Adios...
   Axel.


Other related posts: