h5md-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h5md-user] Mandate Variable-length string datatype


From: Felix Höfling
Subject: Re: [h5md-user] Mandate Variable-length string datatype
Date: Tue, 24 Sep 2013 17:29:42 +0200
User-agent: Opera Mail/12.15 (Linux)

Am 24.09.2013, 15:35 Uhr, schrieb Konrad Hinsen
<address@hidden>:

Felix Höfling writes:

 > One disadvantage of mandatory string types is missing: it puts an
> unnecessary constraint on the format. It would be just for convenience, but > only from a certain point of view. That is my main concern as it foils the
 > idea of a generic format with minimal constraints.

We are back to an old discussion then: does diversity have an intrinsic value?

 Larry Page (Perl):
   There is more than one way to do it.

 Tim Peters (The Zen of Python)
   There should be one-- and preferably only one --obvious way to do it.

For data formats, in particular binary ones such as HDF5, which no
human ever looks at, I prefer simplicity over diversity any time.

Konrad.

I agree that simplicity is a valuable design goal. Simplicity from a
user's point of view or from a developer's point of view?

Now (since Peter made the vlen string mandatory), the H5MD user reading
the spec has to bother about the details of HDF5 String. Before (when all
kinds of HDF5 Strings were allowed), the wording of the spec was simpler
and the user didn't even have to know that there are different strings [1].

Before, the developer of an H5MD library or reader had to be prepared for
reading both types of string. Now, the developer has to check that the
string is of variable length (otherwise his application will trigger an
HDF5 exception in case of a broken file). All he saves is just a few lines
for handling the other case, the fixed-length string ...

Felix


[1] Actually I didn't either until recently due to HALMD and h5py using
different string types.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]