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 X-Google-Thread: f66ab,c2ed41f6f9544612 X-Google-Attributes: gidf66ab,public X-Google-Thread: fa705,4e5700f5f17e49f4 X-Google-Attributes: gidfa705,public X-Google-Thread: 103376,18a09885d036772 X-Google-Attributes: gid103376,public From: feladdress.peter@vtd.volvo.feladdress.se Subject: Re: Is this ground dead? Also, info on Mach that's more recent Date: 1998/01/19 Message-ID: <6a0351$i53@nike.volvo.se>#1/1 X-Deja-AN: 317396465 Content-Transfer-Encoding: 8bit Sender: peter hakanson References: <69rdmb$j29$1@encore.ece.cmu.edu> <199801191517.QAA00894@basement.replay.com> Content-Type: text/plain; charset=ISO-8859-1 Organization: Volvo Corp. Mime-Version: 1.0 Newsgroups: comp.os.mach,comp.unix.bsd.misc,comp.lang.ada Date: 1998-01-19T00:00:00+00:00 List-Id: Checking at compile time is to put a bucket under the hole instead of fixing the leak! Typechecking done by the compiler is (IMHO) the wrong place. It should be done at link time (or load time) . Typechecking at compile time will among other things create awful code at those times where typechecking is not wanted. (like printf() ) and does not really prevent one from screwing up arguments under all circumstances. Very few existing systems does this however... Peter h Anonymous wrote: : <34AE2AE8.ED17B2C6@gildea.net> : <5lzpky66rq.fsf@tequila.systemsz.cs.yale.edu> : <69jr4q$44j$1@encore.ece.cmu.edu> : On 17 Jan 1998 23:08:59 GMT, dacut@henry.ece.cmu.edu (David A. Cuthbert) : wrote: : > Thomas G. McWilliams wrote: : > >David A. Cuthbert wrote: : > >: At any rate, relying on type safety for protection means that you : > >: can't use C, C++, or assembly, or anything written in those : > >: languages (so forget device drivers). Assembly is the killer here; : > > : > >Have you used Ada? Ada is type-safe and more powerful than C for : > >low level bit-twiddling. Ada is a natural for device drivers and : > >systems programming. : > : > Used, no; glanced at code samples, yes. My impression is that it : > looks rather neat (nicer than C++ in many respects), but I've invested : > too much into my C++ tools to even consider a switch. : > : > I'm somewhat confused as to how Ada can be "natural" for device : > drivers and systems programming. For example, how do I code a task : > switch or set up a DMA channel to a device in Ada? Relying on a : > library written in anything but Ada doesn't count. : > : > Of course, I have no idea how I'd do that in C or C++, either, without : > relying on nasty tricks like relying on assumptions about the : > compiler's code generation and purposely breaking the type system. : > : > -- : > David A. Cuthbert (dacut@ece.cmu.edu) : > Graduate Student Electrical and Computer Engineering : > Data Storage Systems Center, Carnegie Mellon University : > : > : Sounds as if you should learn Ada. Ada has low-level features for : specifying where in memory variables reside and how they are : represented, which are missing from C/++, and is type safe and easier to : read than assembler. : Since tasking is part of Ada, one doesn't generally code task switches : explicitly in Ada. For other low-level operations, one generally does : not need to break the type system or rely on assumptions about the : compiler's code generation. Such operations are generally OS or hardware : dependent, so I do not exclude relying on the features of the OS or : hardware. : Jeff Carter PGP:1024/440FBE21 : My real e-mail address: ( carter @ innocon . com ) : "English bed-wetting types." : Monty Python & the Holy Grail : Posted with Spam Hater - see : http://www.compulink.co.uk/~net-services/spam/ -- I am truly sorry for my mungled mail address. Please remove "feladdress" and change "at" to "@" Peter H�kanson,Volvo Technological Development. Dep 6970,Gothenburg,Sweden