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: 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: nobody@REPLAY.COM (Anonymous) Subject: Re: Is this ground dead? Also, info on Mach that's more recent Date: 1998/01/19 Message-ID: <199801191517.QAA00894@basement.replay.com>#1/1 X-Deja-AN: 317361240 Content-Transfer-Encoding: 7bit References: <69rdmb$j29$1@encore.ece.cmu.edu> Content-Type: text/plain; charset=us-ascii Organization: Replay Associates, L.L.P. Mail-To-News-Contact: postmaster@nym.alias.net X-001: Replay may or may not approve of the content of this posting X-002: Report misuse of this automated service to X-URL: http://www.replay.com/remailer/ Newsgroups: comp.os.mach,comp.unix.bsd.misc,comp.lang.ada Date: 1998-01-19T00:00:00+00:00 List-Id: <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/