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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: AI12-0218: What is the portable representation clause for processing IETF packets on little-endian machines? Date: Fri, 11 May 2018 17:12:20 -0500 Organization: JSA Research & Innovation Message-ID: References: <9af47760-e731-4cb5-a1a0-d63e31019ce5@googlegroups.com> <877eob1cc6.fsf@nightsong.com> <5c9b9f90-884f-4de7-8663-d39a67949f4f@googlegroups.com> Injection-Date: Fri, 11 May 2018 22:12:21 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="20504"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:52300 Date: 2018-05-11T17:12:20-05:00 List-Id: "Dan'l Miller" wrote in message news:5c9b9f90-884f-4de7-8663-d39a67949f4f@googlegroups.com... >* on a per-processor, per-toolchain basis, selected via the conditional >compilation >via the C preprocessor. This selection (out of nonportable categorization) >is >what accomplishes the portability. Ada has no equivalent other than >AI32-0218's/GNAT's solution. The best way to do this in Ada is with different package bodies (and sometimes specs) for each target. That's how Janus/Ada is designed, and it works great. I know the GNAT project system even has facilities to make this happen automatically (by selecting the unit to compile based on a version id). The problem is that existing version control systems cannot handle such designs properly. That was definitely true in the late 1980's (so I designed a wrapper around our version control to deal with this), and I haven't seen any that deal with it properly to date. (The main issue being that when a bug is fixed in one such package, you want a notification to check if the same is needed for the other versions. No version control that I'm aware of can handle this - they all seem focused on merging development for a single end-product.) Shortcomings in version control are way outside of anything that the language can control. And using a sub-optimal design because ancillary tools are broken seems to be letting the tail wag the dog. Randy.