Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'resulting': 0.04; 'schema': 0.05; 'xml,': 0.05; 'subject:Python': 0.06; 'correct.': 0.07; 'definitions': 0.07; 'json': 0.07; 'abstraction': 0.09; 'definition,': 0.09; 'forcing': 0.09; 'logic': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'runtime': 0.09; 'wrote': 0.14; 'cleaner': 0.16; 'highlighted': 0.16; 'initially,': 0.16; 'nowadays': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'library': 0.18; 'result.': 0.19; 'format,': 0.24; 'skip:n 60': 0.24; 'header:X -Complaints-To:1': 0.27; 'xml': 0.29; 'errors': 0.30; 'originally': 0.30; 'libraries': 0.31; 'case,': 0.35; 'useful': 0.36; 'possible': 0.36; 'two': 0.37; 'to:addr:python-list': 0.38; 'little': 0.38; 'does': 0.39; 'bad': 0.39; 'structure': 0.39; 'use.': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'users': 0.40; 'skip:u 10': 0.60; 'first': 0.61; 'myself': 0.63; 'became': 0.64; 'frank': 0.68; 'therefore': 0.72; 'leak': 0.84; 'discipline': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: "Frank Millman" Subject: Re: Python declarative Date: Sun, 26 Jan 2014 11:12:57 +0200 References: <8fde6d34-47c5-49a1-a6d0-9ffe3df2d401@googlegroups.com> <52e473fc$0$29999$c3e8da3$5496439d@news.astraweb.com> <3683cd10-592b-4a3d-ba77-b963a1aa2282@googlegroups.com> X-Gmane-NNTP-Posting-Host: 197.87.50.27 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.3790.4657 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4913 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 33 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1390727590 news.xs4all.nl 2905 [2001:888:2000:d::a6]:47583 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:64767 "Rustom Mody" wrote in message news:3683cd10-592b-4a3d-ba77-b963a1aa2282@googlegroups.com... > > Xml, originally a document format, is nowadays used as a data-format. > This conduces to humongous messing, first for the xml-library writers, and > thence to the users of those libraries because library messes inevitably > leak past abstraction barriers to cause user-programmer headaches. > > tl;dr > Frank's principle: "Express little as possible in " > is correct. > "And therefore XML is the solution" > is bad logic > [Unless == "java" !] If that is the case, what is 'good logic'? JSON or YAML? It does not make much difference which format I use. However, I will say that I found it a useful discipline to create an xml schema to describe my form definition, for two reasons. Firstly, I was hand-crafting my form definitions initially, and as I added features it became unwieldy. Forcing myself to create the schema highlighted a lot of anomalies and I ended up with a much cleaner structure as a result. Secondly, it has picked up a lot of errors in the resulting documents which would otherwise have generated hard-to-find runtime exceptions. Frank