On Mon, Sep 23, 2013 at 10:43:39AM +0200, Felix Höfling wrote:
I'm not in favour of restricting the string types and also not of
variable-length strings.
I don't see any benefit for the file format in such a restriction.
From a C++ perspective which hides memory allocation in std::string for
instance, reading a fixed string is much easier. Otherwise, one has to
read a C-string first and to copy to std::string second. (I definitely
don't want to return a plain C-string in C++) For low-level languages
the
converse is true. Eventually, reading a string will go to a single
function inside the reader program and there it is not too much pain to
implement both types of strings IMO.
Abstractions are very hard to get right. To day I have not seen a
single C++ interface to HDF5 that is useful beyond the initial goals
at its conception.
While it is important to have high-level interfaces that guide new
H5MD users (e.g., pyh5md), it is equally important to support those
users that write high-performance programs using the HDF5 API.
Keeping the choice between fixed- and variable-length strings will
simply mean that many writers and readers will not be interoperable,
even if they use the same domain-specific data.