meta language to define forms

Chris Angelico rosuav at gmail.com
Thu Mar 27 23:30:36 EDT 2014


On Fri, Mar 28, 2014 at 2:13 PM, Roy Smith <roy at panix.com> wrote:
> In article <mailman.8653.1395975737.18130.python-list at python.org>,
>  Chris Angelico <rosuav at gmail.com> wrote:
>> Rule of Python: XML is not the answer. XML is the question, and "NO!"
>> is the answer :)
>
> The nice thing about that rule is that it ports easily to so many other
> programming languages.  Except possibly Java.  Java and XML seem to be
> made for each other.

The only times I have *ever* used XML, in my whole life, were when I
needed to communicate with some other end that stipulated XML. (Most
commonly XML payload in HTTP requests and responses, eg SOAP.) In most
of those cases, some simpler structure would have sufficed; and in a
number of them, XML is simply wrong for the job.

>> Your syntax there looks reasonable already. I'd recommend you make it
>> a flat data file, though, don't try to make it a programming language
>> - unless you actively need it to be one. Here are a couple of ways you
>> could format this. Any would be fairly easy to code a parser for.
>
> My first impression here is that YAML might work here.

Good point. Add it as a fifth option!

That section was already turning into a cardinal's weaponry statement.
I said "a couple" and ended up with four... now five. :)

ChrisA



More information about the Python-list mailing list