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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,24d7acf9b853aac8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: S-expression I/O in Ada Date: Sun, 08 Aug 2010 11:26:11 +0100 Organization: A noiseless patient Spider Message-ID: References: <547afa6b-731e-475f-a7f2-eaefefb25861@k8g2000prh.googlegroups.com> <1qk2k63kzh7yv$.3jgc403xcqdw$.dlg@40tude.net> <8ae8e899-9eef-4c8c-982e-bfdfc10072f1@h17g2000pri.googlegroups.com> <258zlxrv4fn6.1vszho1rtmf48$.dlg@40tude.net> <984db477-973c-4a66-9bf6-e5348c9b95f2@n19g2000prf.googlegroups.com> <5d0747cf-3226-4048-beb4-78b617fc19c9@v15g2000yqe.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Date: Sun, 8 Aug 2010 10:26:12 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="KCXegvZb5vh43D+f3BR6Ew"; logging-data="12717"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+7eDrYi2aNq4E/nPTs384u2uDf1W1kz5s=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (darwin) Cancel-Lock: sha1:GgFqGbnkvLJCpVqHc/pzlSmuoPw= sha1:uNbEsC1ZN7ldIcTT7YgY2Zul0I4= Xref: g2news1.google.com comp.lang.ada:12943 Date: 2010-08-08T11:26:11+01:00 List-Id: I'd disagree with Jeffrey here. Nothing wrong with stating at the bottom! especially when you already know that the component you're looking at is likely to be useful and to fit into *your* way of thinking about things. Your plan already has higher-level abstractions, so that if you get to the next layer up and want to change your lowest layer (if only for experimentation's sake) you will be able to do so. Lots of people round here are responsible for component libraries at various levels of abstraction which they've developed for their own purposes and then pushed out to the community in the hope they'll help someone else. The only caution I'd add is that, at some point, when you're reading an S-expression from an external file and you expect the next 4 bytes to contain an integer in binary little-endian format, you're going to have to trust _something_ to have got it right; if you wrote "*(struct foo **)((char *)whatever + bar.offset)" in C you will have to write the equivalent in Ada. Unless you were going to invent a sort of checked S-expression? (I don't get that impression!) --S