Closed mathieu17g closed 3 years ago
I think we don't need to enhance the readability of the macro call, since the current one also works in the reverse direction.
I was thinking more about writing https://github.com/yeesian/ArchGDAL.jl/blob/18578bb0d27b3aa0db707c50dfb097aeb69f8765/src/utils.jl#L60-L75 as a loop as suggested in https://discourse.julialang.org/t/initialising-a-dictionary-with-duplicate-keys/2290/2. That way, the behavior is deterministic rather than relying on the current implementation of Dict
(which could change).
This is great! Thank you so much (as always)!
Fixes #232 Assert "default type comes last" for mappings that are not bijective
I have enriched the
@convert
macro's docstring with some explanations and added a note on "default type comes last"Before going further, @yeesian could you elaborate on:
Should we enforce it with something like: 1) enhance the readability of the macro call
and assert that all type ids of type 1 and all type ids / subtypes of type 2 are unique?
2) Or is it enough to assert that all type id <-> type id / subtype mappings are unique in
args
? 3) Or something else?