JuliaReinforcementLearning / CommonRLInterface.jl

A minimal reinforcement learning environment interface with additional opt-in features.
MIT License
45 stars 1 forks source link

@provide is no longer needed!! (due to inferrable hasmethod) #49

Closed zsunberg closed 1 year ago

zsunberg commented 1 year ago

In Julia 1.10, hasmethod and applicable will be inferred at compile time, so there will be no runtime overhead. More info on this change here and here. This means that we no longer have a need for @provide because provided can just call to hasmethod, so the environment implementer won't have to think about it at all.

This should make the package much easier to use because the environment implementer won't need to learn about @provide! :rocket:

This change won't hit until julia 1.10, but until then, we can use Tricks.static_hasmethod. I can't see any reason why we wouldn't want this, so I am going to submit a PR to deprecate @provide soon.

cc: @the-one-and-only-jackson

zsunberg commented 1 year ago

This was fixed by #50