tk3369 / BinaryTraits.jl

Can do or not? It's easy. See https://tk3369.github.io/BinaryTraits.jl/dev/
MIT License
53 stars 3 forks source link

Get rid of module dependency for traits/interface maps #18

Closed tk3369 closed 4 years ago

tk3369 commented 4 years ago

It seems to be design flaw to maintain trait types and interface contracts by module. That's because a type may be defined in one module but then imported into another module. So it becomes confusing where it came from. For example, if I am going to define a trait that is used for Base types, then should I use my module or Base for lookup?

Since we can always find out the module of a data type using parentmodule function, I want to simplify the design and get rid of the 2-layer dict. Hence this PR.