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: 103376,ded6ba3fc5b87b66 X-Google-Attributes: gid103376,public From: Joel Seidman Subject: Re: First time Ada has let me down Date: 2000/10/25 Message-ID: <39F73954.43446429@NOSPAMappsig.com>#1/1 X-Deja-AN: 685800006 Content-Transfer-Encoding: 7bit References: <8FD7DEBEEsynoptikdamudderfuck@news> <8t60eo$m0m$1@nnrp1.deja.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@mindspring.com X-Trace: dfw-ixnews3.ix.netcom.com 972503382 16871 198.211.244.109 (25 Oct 2000 19:49:42 GMT) Organization: Applied Signal Technology, Inc. Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 2000-10-25T00:00:00+00:00 List-Id: wv12@my-deja.com wrote: [snip] > the length is just len = (*p)&0xf; > the TCP header length occupies the 4 MSB. the length in this case > is then ((*p)&0xf0)>>4; > Things just have to be easy in C, don't they. No wonder 99.99% of the > IP stacks in the world are in C and not Ada. Depends on what "things" you are talking about. If it's programming complex systems, C does not make it easy. Even if the final debugged C code is "shorter" (your idea of "easy"?), what I care about is how long it took to debug it. You can do the equivalent of the above in Ada, too. Promoting the idea that the above is good style is the reason programs are so fragile. (Hint: Consider how much code in a large program you have to change, and how long it takes to find it all, if the 4-bit field is moved from the right to the left, or somewhere in between.) If C doesn't provide a better way to do it (I'm not certain but I don't think so), then give me Ada.