From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,976a050e0f89277c X-Google-Attributes: gid103376,public From: cts@bangkok.office.cdsnet.net (Craig T. Spannring) Subject: Re: Urgent question: malloc and ada... Date: 1998/05/12 Message-ID: <6j8mib$sbp$1@news-02.meganews.com>#1/1 X-Deja-AN: 352449456 References: <352A79C2.15FB7483@nathan.gmd.de> <1998Apr30.180141.1@eisner> Organization: CDS Internet Newsgroups: comp.lang.ada Date: 1998-05-12T00:00:00+00:00 List-Id: In article , Robert I. Eachus wrote: >In article dewar@merv.cs.nyu.edu (Robert Dewar) writes: > > Nice to be referred to as "the distinguished contributor," But >note, that in the real world I live in, I have worked on operating >systems written for the most part in PL/I (Stratus VOS and Multics), >and Assembler. But I have never worked on an OS written in C. >(Worked on in the sense of "wrote or maintained part of the OS.") >However, any modern expert who writes an operating system is going to >use a C compiler for some purposes, such as device drivers. If >nothing else there will be a "least common denominator" call interface >to the OS that is expressed in C. That is the C compiler I had in >mind, the one used to define the OS call interface. I'm a bit confused as to why you would say that any OS expert would use C for some purposes. My experiences with various operating systems has been that the OS's implementation language leaks up through the API's. Calling system functions in C on the Stratus made it clear that VOS was written in PL/I. Calling system functions in AmigaDOS made it clear that the OS was a BCPL program. Windows seems like a mix between Pascal and C. Unix is obviously written in C. I believe that C/C++ makes it more difficult to write robust code than languages such as Ada and Modula-2. (Please, no 'my language i s better than your language' debates. Been there, done that. I just find them boring now.) If a company with deep pockets and a vertical market were to start building a new machine with that premise that writing applications in C is unnecessarily difficult and they have a goal of making applications easy to write it seems logical that they would want to distance the application programmer as far from C as possible. Having no C in the OS is as far as possible. If you tried to limit your use of C to just the device drivers then you would just introduce large amounts of tedious details to manage in the interface between the device drivers and the rest of the OS. As far as defining the OS call interface with C, this seems like a very poor idea. The C compiler can make arbitrary and capricious choices on how it lays out data structures in memory. The C standard makes no indications of how a structure is laid out. BTW- Anyone that had a hand in VOS has to qualify as "distinguished".