Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hdf5: start handleing references #36

Open
donkahlero opened this issue Jul 2, 2018 · 0 comments
Open

hdf5: start handleing references #36

donkahlero opened this issue Jul 2, 2018 · 0 comments

Comments

@donkahlero
Copy link
Collaborator

In earlier discussions, such as #15, we talked about about working with an "HDF5 DataType that describes a pointer to x". As it is right now, whenever we are receiving a pointer, we are dereferencing it and are working with the underlying value.

The code that was at the center of the discussion was:

when creating a DataType

case reflect.Ptr:
     return NewDataTypeFromType(t.Elem())

and when performing encoding in our cmem package:

case reflect.Ptr:
	return enc.Encode(rv.Elem())

Looking at the HDF5 Documentation describing that topic, one notices that this is a bit more complex than we thought in our discussions. The guys there have a separate interface for handling the issue: Reference Interface.

Therefore, if we want to support those referencing types, we would need to create a wrapper for the named interface.

What still would not be resolved by adding the interface, is the issue of what happens if someone would try to e.g. append a pointer to a Go value without going through such an interface. Would we error? Or would we keep the status quo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant