Re: Dimensions with size 0

Harvey,

I appreciate your comments on the usefulness of dimension lengths of
zero.  As you pointed out, in netCDF-3, the unlimited dimension is
permitted to have zero length to indicate no records have been
written, and in netCDF-4 multiple unlimited dimensions will be
permitted, any or all of which can have a length of zero.

It would be difficult to further generalize this to cover fixed-size
dimensions as well.  Sometimes early designs and backward
compatibility constraints together make some kinds of otherwise
desirable changes impractical, even if they appear to be desirable.
This is one of those cases, since there are lots of existing
applications that equate specifying a dimension size of zero with
defining an unlimited dimension, so I think netCDF-4 must be backward
compatible with netCDF-3 in this respect.

For a close analogy, see Guido van Rossum's article comparing how
fiction authors and language designers paint themselves into a corner
in their early work in his "The Harry Potter Theory of Programming
Language Design":

  http://www.artima.com/weblogs/viewpost.jsp?thread=123234

--Russ



  • 2005 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: