tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: proplist
On Thu, Apr 15, 2010 at 10:06:59PM +0400, Aleksej Saushev wrote:
> > Disclaimer: no offense meant, but this is a classic bikeshed here.
>
> No, it isn't. (Let's add fuel to this.)
ok, you asked for it! :-)
>>> '(:plist (:version "1.0" :encoding "UTF-8")
>>> (:dict (("CFBundleGetInfoString" "Heimdal @VERSION@")
>>> ("CFBundleName" "Heimdal")
>>> ("CFBundleIdentifier" "org.h5l.heimdal.pkg")
>>> ("CFBundleShortVersionString" "1.0")
>>> ("IFPkgFlagAllowBackRev" t)
>>> ("IFPkgFlagAuthorizationAction" "RootAuthorization")
>>> ("IFPkgFlagDefaultLocation" "/")
>>> ("IFPkgFlagFollowLinks" t)
>>> ("IFPkgFlagIsRequired" t)
>>> ("IFPkgFlagOverwritePermissions" t)
>>> ("IFPkgFlagRelocatable" nil)
>>> ("IFPkgFlagRestartAction" "NoRestart")
>>> ("IFPkgFlagRootVolumeOnly" t)
>>> ("IFPkgFlagUpdateInstalledLanguages" nil)
>>> ("IFPkgFormatVersion" 0.10000000149011612))))
>>
>> Wow, this is actually uglier than XML.
>
> No, it isn't. Contrary to XML it doesn't require closing
> <SomewhatLongAndUgly/> tags, thus saving your eyesight.
Ugliness is highly subjective. This form can be considered ugly
because it has a lot of completely extraneous double quotes. For
example.
Besides, for a data transfer format it doesn't matter what it looks
like, because ordinarily nobody's going to be looking at it. Binary
formats are generally preferable; for one thing they don't destroy
floating point values.
For a configuration format that's meant to be edited by humans, *all*
these formats are inappropriate.
> In addition you don't need special tools to test whether the expression
> is syntactically valid (it only needs to check that parentheses are
> balanced, even vi-alikes support this operation),
No, it looks like at a minimum it requires checking for matching
quotes and for valid numbers.
> and it doesn't need
> writing any parser because it is ready to process by standard reader.
...if you happen to be programming in LISP. For the rest of us, it
still requires a (admittedly simple) parser.
But even if you do happen to be programming in LISP, feeding arbitrary
text to the reader can yield arbitrary results, which is probably not
desirable.
> >> Such a format is easily readable and parsable by a few lines of CL
> >> code. In this example, keyword symbols are used to avoid package
> >> issues and aid in identifying sections, plist's "arguments" are a CL
> >> plist, :dict are using a CL alist (yet identified with :dict to easily
> >> distinguish it from other lists), bools are booleans, integers
> >> integers, real floats, and arrays litteral arrays.
> >
> > FYI one one is using lisp or obscure languages like it, so
> > why support an obscure data format nobody is using?
> > Im pretty sure that we could export to brainfuck too, but why would we?
> >
> > People use XML, JSON and sometimes YAML.
>
> First of all, Lisp isn't obscure language, it is no more obscure than
> Java or ECMAScript, and it is certainly less obscure than Ruby or Perl.
Um. Are you serious? Perl is one of the least obscure languages in the
world. So is Java. LISP is a footnote.
> If you are serious in your observation on formats in use, then we should
> stop talking about Lua in base and think about ECMAScript.
No, we should use XDR for proplib since we already have tools for that
in base.
*whistle*
--
David A. Holland
dholland%netbsd.org@localhost
Home |
Main Index |
Thread Index |
Old Index