Conversation
|
Basically ok for me, go ahead. Generally, I am not 100% happy with the TDict stuff which emerged relatively early in my Julia career. Clearly one could create singletons from all the types and pass these. So like Another possibility would dictionaries with Val{::Symbol} as key types. This also would allow to dispatch on e.g. ::Val{:NodeCells} and with a bit more voodoo this could be written (since Julia 1.8) as grid.NodeCells. See voodoo here... In fact, as the last part of the example shows, we might be able to do this even without breaking... |
|
But: JuliaLang/julia#25750 (comment)
|
|
Interesting discussion in 25750...
I agree. I also used singletons in another project intuitively. But this does not change the general logic, does it? We only get rid of the TBH: up to the discussion with @Da-Be-Ru on the |
@Da-Be-Ru and I wondered about the magic behind the scenes of the type dictionary system.
We thought it might help future us and other people if we add a small summary of what is going on.
Moreover, this is now a top level doc entry, since new user also ask why we access grid components by type.
@j-fu I removed the
CairoMakiecompat in the docs. Was there a reason for that? It does not work with Julia 1.12 and I do not like compats in docs.