Closed Moelf closed 4 months ago
Is this still an issue now that package extensions can be used, though?
kind of, because the themes are usually a variable, and you can't introduce new identifiers into the namespace with Pkg extension
Wouldn't a pattern like this solve that though?
# MyModule.jl
function mytheme end
# MyModuleMakieExt.jl
import MyModule: mytheme
mytheme() = ...
Also themes (at least in Makie/MakieThemes) are usually functions as far as I've seen?
We kind of want to remove MakieCore, so maybe we should make an issue where we collect, if there's anything important that can't be done without a MakieExt, or any other disadvantage.
I don't think we can define new functions in Extension, so it would be nice to keep recipe magic macros in MakieCore
That's also solvable by defining function stubs and importing them into the extension.
yes, I mean, everything is solvable -- but at the entry-level, it increases code repetition (a bit like C++ declaration and definition).
In the end one could argue because this is developer-facing it's fine, although I think "defining plotting" is so common we want to make the common case as simple as possible
Having MakieCore is not necessarily simple though, as this example also shows. It's hard to define some arbitrary boundary and it also complicates development a bit to have multiple packages where one would do.
It's quite useful to have
IntervalsBetween
as part of the default theme, right now one needs to depend on Makie.jl which is a bit too large.