JuliaIO / HDF5.jl

Save and load data in the HDF5 file format from Julia
https://juliaio.github.io/HDF5.jl
MIT License
383 stars 139 forks source link

Change use constructors instead of functions #1102

Open simonbyrne opened 11 months ago

simonbyrne commented 11 months ago

It's a minor thing, but for Dataspaces and Datatypes, it would be nice if we could use the constructors directly instead of going through functions. e.g. Dataspace((4,4)) instead of dataspace((4,4)).

mkitti commented 11 months ago

Should we just turn the functions into aliases of the constructors?

simonbyrne commented 11 months ago

In #1104, I changed it so that Dataspace is a basic constructor, but you use dataspace(obj) to get the Dataspace of an object. I think that distinction is helpful, as it can avoid some ambiguities (e.g. getting the dataspace of a tuple)