You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue, or rather discussion of the desired API, came up in #48.
With this PR now ExpLink etc. is a type alias of Link{typeof(exp)} and ExpLink() calls Link(exp). Intentionally, the PR was non-breaking. However, it leads to the following questions:
Should we deprecate the type aliases and remove them eventually?
Should we deprecate the constructors and remove them eventually?
Personally, I am favour of 2 and probably of 1:
I don't see a clear advantage of eg. ExpLink over Link(exp) but there would be fewer definitions and the API would be cleaner if the former would be removed.
It is less convenient to dispatch on Link{typeof(exp)} instead of ExpLink. However, I think it is questionable if this use case is a strong enough argument to include type aliases in GPLikelihoods. Instead in my opinion it would be sufficient if users and downstream packages define (possibly internal) type aliases if it is useful for their implementation. So currently I think type aliases should only be included but not necessarily exported if they are useful and used in GPLikelihoods.
@theogf suggested to add a macro @link CosLink cos that would define both the type alias and constructor (hence it assumes that we don't deprecate any of them). I'm not in favour of a macro, both because I think we should deprecate probably both definitions and because I think the definitions are already quite short and simple and so the macro feels too magical given these limited benefits.
The text was updated successfully, but these errors were encountered:
An additional argument for removing the type aliases and constructors is #51: It shows that (it seems) one could remove Link (and also AbstractLink) completely, as suggested by @st-- in #43.
This issue, or rather discussion of the desired API, came up in #48.
With this PR now
ExpLink
etc. is a type alias ofLink{typeof(exp)}
andExpLink()
callsLink(exp)
. Intentionally, the PR was non-breaking. However, it leads to the following questions:Personally, I am favour of 2 and probably of 1:
ExpLink
overLink(exp)
but there would be fewer definitions and the API would be cleaner if the former would be removed.Link{typeof(exp)}
instead ofExpLink
. However, I think it is questionable if this use case is a strong enough argument to include type aliases in GPLikelihoods. Instead in my opinion it would be sufficient if users and downstream packages define (possibly internal) type aliases if it is useful for their implementation. So currently I think type aliases should only be included but not necessarily exported if they are useful and used in GPLikelihoods.@theogf suggested to add a macro
@link CosLink cos
that would define both the type alias and constructor (hence it assumes that we don't deprecate any of them). I'm not in favour of a macro, both because I think we should deprecate probably both definitions and because I think the definitions are already quite short and simple and so the macro feels too magical given these limited benefits.The text was updated successfully, but these errors were encountered: