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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,602331146257f418 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!newsread.com!news-xfer.newsread.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!newsfeed.kamp.net!newsfeed.freenet.de!news.germany.com!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Data table text I/O package? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <42b169a6$0$27776$9b4e6d93@newsread2.arcor-online.net> <8j219bkiemjq$.1mmc0sh5a5yfi$.dlg@40tude.net> <42b17420$0$1141$9b4e6d93@newsread4.arcor-online.net> <24xw0b1odenq.mogaaz1unwv0.dlg@40tude.net> <42b6a64f$0$1132$9b4e6d93@newsread4.arcor-online.net> <1in4nty16vspl$.1cicehrmojyok$.dlg@40tude.net> <42b70a06$0$27782$9b4e6d93@newsread2.arcor-online.net> <1u56bhsve8jaq$.1jaobcwbltsz1$.dlg@40tude.net> <42b7dccb$0$1138$9b4e6d93@newsread4.arcor-online.net> Date: Tue, 21 Jun 2005 12:42:03 +0200 Message-ID: <2o3wvkpwoqv8.11k4w9yehrxxx$.dlg@40tude.net> NNTP-Posting-Date: 21 Jun 2005 12:42:03 MEST NNTP-Posting-Host: 496ffdbd.newsread2.arcor-online.net X-Trace: DXC=dP@MU7hA__f18V74W6`bolQ5U85hF6f;djW\KbG]kaMhXSE8@R32 On Tue, 21 Jun 2005 11:24:34 +0200, Georg Bauhaus wrote: > Dmitry A. Kazakov wrote: > >> No, you just have to use different delimiters between and within the >> fields. > > "You just have to... ". No, gosh, the space was _mistyped_, > it wasn't intended. This goes for any typo irrespective of what > delimiter you choose. Now any reasonable CSV has far less offerings for > error correction facilities for typos like these than any reasonable > XML. By definition. (And, yes, I know you can construct syntax errors > in XML, too, if you think this is an argument ...) > > Is it the typical Ada programmer's attitude to promote self-documenting > bracketing constructs only for program text, but never for data text? See below. It is a table. It has bracketing: rows and columns. This form existed for centuries before XML. Who would print tables of logarithms in XML? >> This is why in Ada parameters of a procedure call are separated by >> commas rather than spaces. >> >> Though is it about what syntax would be the best? Or is it about how to >> parse something in a defined syntax? > > HAving a "best syntax" requires a measure for syntax quality. > If you measure what a syntax can do in a heterogenous project > by applying your personal aesthetic preferences, > or your reading habits, or your programming skills, I have nothing to say. > > If you care about robust data interchange in a "sloppy > field", you employ standard tools to help you get the correct > data. That is a different problem for which I would use a well-defined binary format instead of fancy 3.15. What is the *accuracy* of this value, huh? >> Now consider a space between / and >: >> >> >> >> XML adds here nothing, but a huge readability loss. > > Oh well... You mean > > Distance'(km => 3.15) > > can be read well, whereas > > Distance'( km => 3.15 ) > > is a huger readability loss? Come on. Distance isn't a record. At least it should not be visible as such. Neither distance is a type. The closest Ada's equivalent would be Distance => 3.15 km, or Distance := 3.15 km; But, lack of readability is not in the ugly brackets. Tabulated data are readable because they are tabulated. That is: the names, the types and units are *factored* out to the table header, which allows the reader to concentrate on the *values*. Thus a table looks as: Distance [km] Temperature [�C] ... 3.15 29.0 ... 2.10 14.4 ... This is readable. To make difference more visible, consider bitmaps stored XML format. Would you be able to recognize a person's face in it? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de