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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Unix/Java design issues (Was: Re: Is CDATA "structure"?)

[ Lists Home | Date Index | Thread Index ]
  • From: John Cowan <cowan@locke.ccil.org>
  • To: XML Dev <xml-dev@ic.ac.uk>
  • Date: Wed, 21 Jul 1999 10:09:56 -0400

Marcelo Cantos wrote:
> > The basic problem is code like this:
> >
> >       unsigned count;
> >       while (--count > 0) {
> >               /* do something */
> >               }
> >
> > This loop will never fail,
> 
> Yes it will.  I presume you were thinking of >=.

Yes.  It's hard to write bad code *deliberately*; I hesitated for
a while, and finally settled for the above (incorrectly correct)
version.

> Usually one will find that if 2 billion isn't a large enough number
> then 4 billion isn't either (or won't be for long), and a 64 kB file
> size limit is hardly less annoying than a 32 kB limit, so increased
> numerical range isn't as compelling an argument for unsigned types as
> it might seem.

Just so.

> Consequently I think it is unwise to enforce a no-unsigned-types rule.

In the Java context, however, I think it is safe enough.

-- 
	John Cowan	http://www.ccil.org/~cowan	cowan@ccil.org
Schlingt dreifach einen Kreis um dies! / Schliesst euer Aug vor heiliger Schau,
Denn er genoss vom Honig-Tau / Und trank die Milch vom Paradies.
			-- Coleridge / Politzer

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

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

Copyright 2001 XML.org. This site is hosted by OASIS