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

Iteration of BlobTreepairs or values? basename? #42

Open
c42f opened this issue Apr 28, 2022 · 0 comments
Open

Iteration of BlobTreepairs or values? basename? #42

c42f opened this issue Apr 28, 2022 · 0 comments

Comments

@c42f
Copy link
Contributor

c42f commented Apr 28, 2022

BlobTree currently iterates values for much the same reasoning that Dictionaries.jl does (broadcast support, etc). For cases where the name is important this might seem inconvenient. But individual Blob or BlobTree elements in the iteration also know their names via basename which makes it possible to extract names where necessary. To resolve this it's probably best to translate some examples of data processing code to the BlobTree API and see whether pairs() or values() is desired for iteration.

As a side note, having values know their own keys via basename is quite an oddity for a dictionary-like datastructure. Is this a problem in itself? Generally, Blob is only a lazy reference to data held outside Julia. An individual Blob object presumably won't be an element of two different BlobTrees — it needs to cause a copy in the background. Perhaps this isn't so bad, then.

@c42f c42f mentioned this issue May 6, 2022
15 tasks
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