the reason windows does it is code reuse and fast development of drivers. the same can, of course, be done in C if you're creative enough in your design. Be had tried with a few of the modules (joystick one comes to mind) but others such as I^2C modules and such were missing. (linux has some) actually in BeOS there was an unofficial USB kit developed by swetland because most people (even on linux) agree that many USB drivers should be developed outside of the kernel. keyboards, mice, storage devices and other generic class drivers being exceptions. the USB kit kind of disappeared. After swetland left Be there was no more work done on it. but it certainly made writing some of these drivers so much easier. there was also at one point a 1394 kit being started. you could find very old source on their site that still looked as if it was in the idea stage. it's good to have these types of interfaces if for no other reason than testing and stability. so you can first develop a user space driver and if you need more speed / lower latency you can take it into the kernel if it's absolutely necessary. -soco ----- Original Message ----- From: "François Revol" <revol@xxxxxxx> To: <openbeos@xxxxxxxxxxxxx> Sent: Thursday, January 17, 2002 12:30 AM Subject: [openbeos] Re: Support of C++ for writing Drivers > And I don't see why we would use C++ in drivers as well, it's not meant for that. > Maybe Windows CE does it, that's not why we either should do it or not. > Just that it seems to me that now that M$ want's to get everyone out of kernel > land where even MSWord could go, they allow them a lot of things to make their > life easier. Nothing strange now that Windows CE crashes so often :))) > C++ is not a language for that, it's too convoluted IMO. We need something > simple for kernel land, something that makes it easy to know which func each > byte belongs to. > I think there is a reason why Linux, *BSD, (*NIX I know of), Minix, XINU, > QNX (?), are all coded in C (not to mention MacOS in Pascal, and AmigaOs in B I > think, though AmigaOs was OO, but an OO language doesn't make an OO prog, > neither an OO-prog needs an OO language, for example tweaking ffmpeg C sources > makes me feel writing in C++). > As for the current version anyway, C++ is not supported in the kernel, even if > there was one newsletter that explained how to hack some basic C++ things, but > it wasn't easy IIRC. > > François. > > My 0.02 FF (sorry I need to get rid of them :P) > > > En réponse à Michael Phipps <mphipps1@xxxxxxxxxxxxxxxx>: > > > As I told you privately, R1 will be C only for drivers > > (well, as much so as R5 was/is). Any further conversation > > on this should go to Glass Elevator. > > > > >While i was coding for a USB driver in BeOS i had > > >to use 'C' because C++ wasn't supported by the > > >kernel. It would be great if OBOS supports c++ > > >for writing drivers. Because the entire flow of > > >logic becomes very easy and every functionality of > > >the driver can be encapsulated in to classes. Windows CE > > >does support C++ for writing USB drivers. So i suppose > > >that OBOS should also be able to support C++. Well > > >how far the things i am saying will be feasible I don't > > >know. > > > > > >Your thoughts please. > > >ANIL > > > > > > > > > > > > > > > > > > >