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.1 required=5.0 tests=BAYES_20,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b0123581076a0cf3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-09-13 03:26:34 PST Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!agate!msuinfo!harbinger.cc.monash.edu.au!aggedor.rmit.EDU.AU!goanna.cs.rmit.oz.au!not-for-mail From: ok@goanna.cs.rmit.oz.au (Richard A. O'Keefe) Newsgroups: comp.lang.ada Subject: Re: Ada ad in Embedded Systems Programming stinks Date: 13 Sep 1994 20:10:22 +1000 Organization: Comp Sci, RMIT, Melbourne, Australia Message-ID: <353tqe$7pa@goanna.cs.rmit.oz.au> References: <1994Sep1.084046.21595@sei.cmu.edu> <344u9q$di5@gnat.cs.nyu.edu> <347idh$15ss@watnews1.watson.ibm.com> <34tu91$139u@source.asset.com> <34usma$hti@gnat.cs.nyu.edu> <19940911.4965@naggum.no> NNTP-Posting-Host: goanna.cs.rmit.oz.au NNTP-Posting-User: ok Date: 1994-09-13T20:10:22+10:00 List-Id: gijs@mbase97.xs4all.nl (Maarten Landzaat) writes: >But seriously: I think you are exaggerating. Programmers should write >'good' code. One of the virtues of good code is that it uses constructs >that anybody can understand. It's the same as with natural language: >difficult sentences sound bombastic and don't get the message across. I think you have misunderstood the reason why it is essential to keep checking the manual. I personally am sick and tired of C code "that uses constructs that anybody can understand" but doesn't work. Example: someone else's code I'm _still_ trying to fix after a couple of weeks (ok, I'm not doing this full time) which, amongst other things, assumes that (a) pointers and 'int's are the same size and (b) casting a pointer to an int preserves all the bits. If I tell you that this is not true, you can probably guess which machine and what memory model... The point of checking the manual is not to become intimate with all kinds of super-whizzy features that demonstrate your wizard-hood, but to learn what kinds of things to _avoid_. Far too many people confuse what happens to work in their implementation, or what seems to them like the obvious translation, with what the language actually promises. The C standard, for example, is exceptionally valuable because it has appendices with long lists of things you _thought_ were ok but aren't. I was really shocked when I found out how many things I had relied on were just 'common extensions'. If you only have the programmer's reference manual for Brand X, you don't know what you _shouldn't_ be using. -- The party that took Australia into Vietnam wants to smash the inner-city yacht school and put a Grand Prix in its place. They don't change.