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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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,CP1252 Path: g2news1.google.com!postnews.google.com!f6g2000yqa.googlegroups.com!not-for-mail From: Natacha Kerensikova Newsgroups: comp.lang.ada Subject: Re: S-expression I/O in Ada Date: Sat, 14 Aug 2010 04:32:44 -0700 (PDT) Organization: http://groups.google.com Message-ID: <18b8d0f6-f98a-48bb-9ee1-a07af23e0241@f6g2000yqa.googlegroups.com> 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> NNTP-Posting-Host: 178.83.214.115 Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1281785564 31144 127.0.0.1 (14 Aug 2010 11:32:44 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 14 Aug 2010 11:32:44 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f6g2000yqa.googlegroups.com; posting-host=178.83.214.115; posting-account=aMKgaAoAAAAoW4eaAiNFNP4PjiOifrN6 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.3) Gecko/20100524 Firefox/3.6.3,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:13279 Date: 2010-08-14T04:32:44-07:00 List-Id: On Aug 14, 3:02=A0am, Yannick Duch=EAne (Hibou57) wrote: > If you feel XML is too much heavy because it requires close =A0 > tag, then just think about it as the Ada's =93end if=94, =93end case=94, = =93end =A0 > loop=94 and so on. These closes tags enforce human readability and help = =A0 > reliability in the sence that one always know what is starting and ending= , =A0 > and a close-tag missmatch help to detect an error was done. Well, I don't have strong opinions about closing tags. They do clobber the screen, which is a negative point for readability, but in some situation knowing what is being closed does help readability. So in general I won't dare judging whether closing tags are helpful or harmful. And in some very specific cases, the answer is clear: for a 20-character content without sub-objects, the closing tag doesn't really add much value, while for a 1000-line unindented complex object its help surely vastly overpowers its cost. Now on the ease-of-implementation side, remembering the tag stack and checking closing-tag match is surely much more complex than matching any closing parenthesis. Adding a recovery mechanism makes implementation even more complex (and violate XML standard, which is the main reason behind my (irrational) hate of XML). This triggers the question whether the indubitable benefits outweigh the complexity cost (and back when I chose S-expressions the answer was clearly "no", but I'm fully aware of how the answer can be different on large and complex projects unlike mine). > I you still feel XML is too much heavy, then just read this :http://quode= rat.megginson.com/2007/01/03/all-markup-ends-up-looking-l... > > This demonstrate that as things goes, none of XML, LISP expressions or = =A0 > JSon, none is more simple than the other, and LISP expressions or JSon = =A0 > serializations just looks simple on very simple cases. When thing goes, = =A0 > this is another story. Surprisingly, my first reaction to the article you linked was more along the line "wow, they managed to make S-expression as unreadable as XML." rather than improving my view of XML. However with a little reformatting (more line breaks and indentation) the S-expressions from the article can look much more readable (at least to my eyes). While I can't do the same thing with his XML, it doesn't mean it's impossible. Moreover it's probable most XML I've seen was not designed to be extremely human readable, while S- expression I've seen are almost all mine, designed to be me-readable. I guess it goes a long way into making to prejudice that XML is unreadable. > Did not wanted to make you change your mind (this idea is far from my =A0 > though), rather wanted to make you see there is no way to assert XML is = =A0 > too much heavy of LISP expressions are more human readable (I have never = =A0 > seen a readable LISP program by the way... I feel this is maid to be read= =A0 > by machines, not human). I agree I don't know anymore which is more human readable between XML and S-expression. Still, XML is heavier to use in programs than S- expressions, and I still take it for a fact. Thanks for opening my eyes, Natacha