Return to BSD News archive
Newsgroups: comp.os.386bsd.development Path: sserve!manuel.anu.edu.au!munnari.oz.au!constellation!convex!convex!cs.utexas.edu!zaphod.mps.ohio-state.edu!howland.reston.ans.net!newsserver.jvnc.net!yale.edu!ira.uka.de!gmd.de!fanoe!veit From: veit@fanoe.gmd.de (Holger Veit) Subject: Re: Release of drivers etc. Message-ID: <1993Mar4.095753.18290@gmd.de> Sender: veit@fanoe (Holger Veit) Nntp-Posting-Host: fanoe Organization: GMD - German National Research Center for Computer Science References: <18685@umd5.umd.edu> <1993Feb26.084810.15566@gmd.de> <RICH.93Feb26094352@omicron.Rice.edu> <C3Bzup.CC7@jshark.inet-uk.co.uk> Date: Thu, 4 Mar 1993 09:57:53 GMT Lines: 80 In article <C3Bzup.CC7@jshark.inet-uk.co.uk>, joe@jshark.inet-uk.co.uk (Joe Sharkey) writes: |> In article <RICH.93Feb26094352@omicron.Rice.edu> Rich@Rice.edu |> writes: |> >In article <1993Feb26.084810.15566@gmd.de> veit@fanoe.gmd.de |> (Holger Veit) writes: |> > |> 3. add a C++ calling convention. |> > This is acceptable. To clarify: I am aiming at the calling |> interface which is |> > already "object-oriented", though in C. I do not want to |> convert all the driver code |> > into C++, just because it is a nice language. You can write |> quite nice C++ code |> > |> >Another motivation for using C++ is strong typing and all the |> compile |> >time checking that goes with it. Rich |> |> Heretical thought: |> |> Let's do this properly, and re-write the whole mess in Ada ;) |> |> Oh, all right: Modula-3. I take your argument, although the first part of it had a smily, as a serious comment. Your argument is aiming at the extreme overhead these languages appear to have, and the strong typing which was remarked by Rich as an advantage. The first point is: Noone said that the whole object-oriented stuff like a Smalltalk-compatible object system which parts blow up the executables, should be put into the kernel as well. The "streams" classes look nice for object-oriented purists, but the kernel should be stable and consistent, not primarily have a nice outlook. To understand where strong typing might make sense, just add the -Wall gcc-option to the Makefile.i386 and recompile the kernel. Much of the code does luckily work because sizeof(pointer)==sizeof(int), but there are still many parts in the code that I wouldn't trust if these were real hardware parts in the motor of my car. Unfortunately, CS courses on C++ do not focus on efficient programming, which is necessary - and possible! - here. Ada and Modula-3, the latter in particular, draw this "declarationism" to an extreme, and require real converter functions in places where a C or C++ compiler is happy with a cast and does the necessary things automatically. Furthermore, C++ is, with some minor differences, downward compatible to C, so talking about rewriting anything is not a debate. |> Joe Sharkey joe@jshark.inet-uk.co.uk |> ...!uunet!ibmpcug!jshark!joe Holger -- Dr. Holger Veit | INTERNET: Holger.Veit@gmd.de | | / GMD-SET German National Research | Phone: (+49) 2241 14 2448 |__| / Center for Computer Science | Fax: (+49) 2241 14 2342 | | / P.O. Box 13 16 | Three lines Signature space | |/ Schloss Birlinghoven | available for rent. Nearly DW-5205 St. Augustin, Germany | unused, good conditions