Closed MasonProtter closed 4 years ago
I am less opposed of this since it is relatively small. What would actually be rather interesting is to take Shashi's ReflectOn idea and use it to implement Cassette's Tagging as an extension.
I don't know much about tagging, but naïvely, it seems like it's a better candidate for a separate package than ReflectOn
is.
RelfectOn
seems like an almost quintessential cassette action. Take a method call and force it to go to a different method that may be overly restrictive.
I'm not actually sure yet if this PR would be sufficient to get ReflectOn
working in a separate package. I think there's an issue with how overdub
is defined blocking my strategy from working, so merging this may be pointless.
RelfectOn seems like an almost quintessential cassette action. Take a method call and force it to go to a different method that may be overly restrictive.
Right my reservation is that tagging and ReflectOn are supposed to do pretty much the same thing, but they do it in parallel. I would be happy to make tagging less of a core Cassette thing.
@shashi any thoughts?
Right my reservation is that tagging and ReflectOn are supposed to do pretty much the same thing, but they do it in parallel. I would be happy to make tagging less of a core Cassette thing.
Tagging can only do the same thing as something like RelfectOn
if you have an actual value to pass around. If you don't have a legit value to tag, ReflectOn
is more general.
Yeah I think in theory we can add ReflectOn
here and move the Tagging stuff out into another package and have it rely on ReflectOn
. I'm not a 100% sure that that wouldn't need more features from Cassette.
Given the hesitance to merge https://github.com/jrevels/Cassette.jl/pull/157, I'd like to implement
ReflectOn
in a separate package. However,overdub_pass!
is a gigantic function and in order to makeReflectOn
work, I'd need to copy paste all ofoverdub_pass!
just so I can addoffset=2
for theReflectOn
method. Instead, I think it'd be nice ifoffset
could just be an argument tooverdub_pass!
. I think this would be beneficial to others who might want to tweak or alteroverdub
as well in a similar way.