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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4873305131bf4d94 X-Google-Attributes: gid103376,public X-Google-Thread: 1014db,4873305131bf4d94 X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,4873305131bf4d94 X-Google-Attributes: gid109fba,public From: fred@genesis.demon.co.uk (Lawrence Kirby) Subject: Re: Porting Experiences (was Ada and Pascal etc ) Date: 1997/11/06 Message-ID: <878836086snz@genesis.demon.co.uk>#1/1 X-Deja-AN: 288178877 References: <34557f2b.1934172@news.mindspring.com> <345BB35E.4488@dynamite.com.au> <63ftj9$r9g@bgtnsc02.worldnet.att.net> <345E3ACD.A15@gsg.eds.com> <63mcmm$r3s$1@helios.crest.nt.com> <345F95D0.3984@gsg.eds.com> <63omr0$put@bgtnsc02.worldnet.att.net> <34610614.33AC@gsg.eds.com> X-Mail2News-User: fred@genesis.demon.co.uk X-Complaints-To: abuse@demon.net X-Mail2News-Path: genesis.demon.co.uk X-Trace: mail2news.demon.co.uk 878838874 29397 fred genesis.demon.co.uk Organization: none Reply-To: fred@genesis.demon.co.uk Newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Date: 1997-11-06T00:00:00+00:00 List-Id: In article <34610614.33AC@gsg.eds.com> nospam@gsg.eds.com "Seymour J." writes: >Craig Franck wrote: >> >> C is no less portable because of this. You may have a case if you >> state that, perhaps, in this particular aspect of constructing >> portable programs, Ada is more efficient. You can define your basic >> types and have the compiler figure it all out. That may make for >> more optimal code generation. But optimal code generation is not >> the main goal of portable software. If the code runs half as fast >> as a native assembler coded routine done by some asm guru whose >> been pounding away at it for a week, you should be happy with your >> tools. > >It's not just an efficiency issue. As an example, if I have to process >data from the outside world, there is no portable way to declare them in >C. Certainly there is, you may have to do slightly more work explicitly. In C you can treat any byte format as a sequence of unsigned chars. There's plenty of portable C code around to deal with, for example, stadnard file formats such as GIF and ZIP. >As to the comparison with assembler, there are two problems with it. >First, the alternative under discussion was Ada, and that's more >maintainable than C, not less. I won't argue eihter way there. You may be right to some degree, but the point is that C isn't as unmaintainable as you seem to make out. >Second, if you are using a modern >assembler with a decent macro processor, the assembler code is likely to >be more maintainable than C code as well (yes, I know that it won't be >as tight as hand coded one-for-one, but that doesn't bother me.) However that is an absurd statement. There has beena large trend of moving from assembly to C (embdeed systems development is a good example) precisely because the latter is more maintainable. Macros help but they aren't a universal panacea. If macros are so good how often do you use them in Ada? -- ----------------------------------------- Lawrence Kirby | fred@genesis.demon.co.uk Wilts, England | 70734.126@compuserve.com -----------------------------------------