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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE, MSGID_SHORT autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!uwm.edu!rpi!crdgw1!jupiter!kassover From: kassover@jupiter.crd.ge.com (David Kassover) Newsgroups: comp.lang.ada Subject: Re: if UNIX then USE_C ?? (was: Reasons for drop) Message-ID: <5518@crdgw1.crd.ge.com> Date: 25 Feb 90 19:58:02 GMT References: <27187@cup.portal.com> <18175@megaron.cs.arizona.edu> <5476@crdgw1.crd.ge.com> <34196@news.Think.COM> Sender: news@crdgw1.crd.ge.com Organization: Aule-Tek, Inc. List-Id: In article <34196@news.Think.COM> barmar@think.com (Barry Margolin) writes: ... >The most obvious way in which a particular OS is oriented towards a >particular language is when it comes to data being passed between >application programs and OS routines. Unix kernel routines and system >library routines expect things like null-terminated strings and structures >laid out the way that system's C compiler lays them. Programs written in >other languages often need to transform data when passing it into and out >of the OS. > >Another area of language bias is documentation. Unix manual pages for >subroutines generally describe the invocation mechanism and argument types >in C syntax. > ... C and Unix go together because they were implemented together, the C language to make the writing of the OS (which, after all, is just another computer program) easier. Using standard libraries (all that means is that *someone else* has implemented the interface from particular hardware to the language specification (Go ahead, flame. I know that's simplistic)). If one is writing a truly embedded system, then it's easy to fulfill the requirements of the Requirements and Functional specifications (assuming you have them...). On the other hand, if you're trying to implement a software system where there are specific (or specified) desires to take advantage of a particular platform feature, or that is intented to by interacted with by humans, you have to start getting into language extensions or hardware features, etc. Back to Ada vs. C. Ada, as specified, does a rather complete job of eliminating bugs caused by single character typos. (Ref the DO statement problem) One which it will not catch is that case where two variables whose names differ by one character are both declared in the same scope. C, on the other hand, does still have cases where the placement of a semicolon in the wrong place will alter the meaning of a program without having a failed compile (Yes, I know Lint can ask about things like this. I know some compilers warn about assumptions they are making. ANyone out there ever use PL/C?).