OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Preoccupation with zero, empty strings, empty elements,empty everything

On Sat, Dec 7, 2013 at 8:34 AM, Costello, Roger L. <costello@mitre.org> wrote:
Hi Folks,

When was the last time you went to the store to purchase zero oranges?

Well, frequently.  The last time I went to the store I purchased zero oranges, in fact.  But I admit I did not go there with that purpose.
When was the last time you created an XML document to have zero elements?

Such a document is not well-formed.
        - Many programming languages do not
          support records with zero fields

This works in C, at least as implemented by gcc 4.8.1.  Turning on -Wall -pedantic triggers a warning.  It's useless, anyway.
        - Many programming languages do not
          support arrays with zero elements

This also works in gcc 4.8.1.  Turning on -Wall -pedantic tells us that the zero-size array violates ISO C but is permitted as a gcc extension.
        - Many programming languages do not
          support variable definitions with zero

This triggers a gcc warning by default, as it is useless, but it works.
        - In some programming languages the
          syntax for calling a routine with zero
          parameters differs from that for a
          routine with one or more parameters

I'm not familiar with any languages that make this mandatory.  In Algol 68 it's *possible* to call a procedure with no parameters without using (), but this is a type coercion from (say) "proc-returning-int" to "int".
        - Many compilers refuse to compile a
          module that defines zero names

This works by default in gcc, but -Wall -pedantic again says that ISO C forbids it, probably because of its uselessness.

        - No parser generator can produce a
          parser for the empty language (the
          language with zero strings)

This preoccupation with empty strings, sets, languages, etc. is not frivolous, since it is well-known that the ease with which a system handles empty cases is a measure of its cleanliness and robustness.

Not always.

GMail doesn't have rotating .sigs, but you can see mine at http://www.ccil.org/~cowan/signatures

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS