-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add method applyToContext
to all FunctionN traits
#10923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.13.x
Are you sure you want to change the base?
Conversation
d4d8113
to
c6741ea
Compare
c6741ea
to
ac5e5d0
Compare
Hello @SethTisue , could you please point me in the right direction how a PR like this can get merged? |
@sideeffffect we're planning to open up the standard library for new additions in 2.13.17 (https://docs.scala-lang.org/sips/drop-stdlib-forwards-bin-compat.html), we'll look into this PR for that release. 2.13.16 will stick to the old forwards binary compatibility, it's going to be a small release to support 3.6. |
Given that both 2.13.16 and 3.6.0 have been released, can this PR get reviewed, please? @lrytz |
IMO this is lacking a serious motivation. Is there for example a Contributors thread where several users express the need for these methods? Anecdotally, you need them; also anecdotally, I never came across that need. ;) Also, for the PR as such, should it move forward, it needs tests. |
I've described a use case for this here https://old.reddit.com/r/scala/comments/1eqqng2/the_simplest_dependency_injection_pure_scala_no/ In short, I believe converting between ordinary and contextual function is important and will be even more, once But I'd be happy to open a new thread on Contributors, soonish. |
applyToContext
essentially turns ordinary functions to "contaxtual" functions.This is an indispensable piece of functionality when working with contextual functions and contexts, which is the hallmark of Scala. Thus
applyToContext
belongs to the standard library.Alternative names
toContextual
fromContext