h5md-user
[Top][All Lists]
Advanced

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

Re: [h5md-user] Species Data Type


From: Olaf Lenz
Subject: Re: [h5md-user] Species Data Type
Date: Fri, 09 Aug 2013 19:41:06 +0200
User-agent: Kaiten Mail


Peter Colberg <address@hidden> schrieb:
>The same thought also struck my mind after discovering enums. However,
>I think enums are better used only where storage efficiency is needed,
>i.e. for (potentially) large arrays. In particular, the integer values
>of an enum type should not be hard-coded, since they are intended as a
>program-internal representation, while the associated strings are the
>HDF5 data representation.

In the case of the species, memory efficiency might actually be needed, when it 
comes to really large systems. 

As for the boundaries, I note that the associated integer values of an enum are 
explicitly specified by the user, and the conversion to an integer type is 
explicitly mentioned in the users manual. If the integer values should not 
carry semantics, the enum type could be specified without it. I think it is 
safe to use enums and to specify the meaning of specific values.

>I actually find variable-length strings easy to use ;-).

There is, however, the memory problem, and the issue that an integer is 
actually easier to use in many languages. 
 
Olaf

So i think



reply via email to

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