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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7624df5e57d09688 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-11 09:36:53 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!news-hog.berkeley.edu!ucberkeley!newshub.sdsu.edu!west.cox.net!cox.net!news-east.rr.com!cyclone.kc.rr.com!news.kc.rr.com!cyclone3.kc.rr.com!news3.kc.rr.com!twister.socal.rr.com.POSTED!not-for-mail Message-ID: <3D06273F.AD73660E@san.rr.com> From: Darren New X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: config files proposal References: <3D03E1AD.80EB805D@san.rr.com> <3D04C9D0.7DFCED9D@san.rr.com> <4519e058.0206110515.729f4775@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 11 Jun 2002 16:36:53 GMT NNTP-Posting-Host: 66.75.151.160 X-Complaints-To: abuse@rr.com X-Trace: twister.socal.rr.com 1023813413 66.75.151.160 (Tue, 11 Jun 2002 09:36:53 PDT) NNTP-Posting-Date: Tue, 11 Jun 2002 09:36:53 PDT Organization: RoadRunner - West Xref: archiver1.google.com comp.lang.ada:25744 Date: 2002-06-11T16:36:53+00:00 List-Id: Ted Dennison wrote: > Yeah, but then you can't make group comments, like: > ----------------------------------------------------------- > -- The next few items set up system timeout values. Valid > -- values range from 0 to 120. The units are in seconds. > -- A timeout value of 0 indicates no timeout. Sure. Any comment more than 76 characters wide gets wrapped on output. > > -- This is comment one > > key1=value1 > > -- This is comment two > > key2=value2 > > True, but it complicates the parsing code significantly, while XML > could handle it easily with some kind of attribute-comment tag. Uh, it does? I don't *think* so. It seems quite straightforward to parse such a thing. My concern with the XML vs INI wrt comments is the possibility that it would make the data structure rather complex. What API do you want to use to say "I want section FOO to have two comments, then key1=value2, then another comment"? All of a sudden, you're not manipulating a collection of keys and values, but rather you're writing out streams of tokens. If each item in the database is a 4-tuple of package, comment, key, value, then it's easy to manipulate. If you start treating the database as a stream of values, where you can have empty sections, sections with only comments, comments with no keys associated, etc, you're going to have a much more complex API for no real good reason other than to make it look like XML. :-) -- Darren New San Diego, CA, USA (PST). Cryptokeys on demand. ** http://home.san.rr.com/dnew/DNResume.html ** ** http://images.fbrtech.com/dnew/ ** My brain needs a "back" button so I can remember where I left my coffee mug.