Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add methodapplyToContext 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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
sideeffffect wants to merge2 commits intoscala:2.13.x
base:2.13.x
Choose a base branch
Loading
fromsideeffffect:applyToContext

Conversation

sideeffffect
Copy link
Contributor

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. ThusapplyToContext belongs to the standard library.

Alternative names

  • toContextual
  • fromContext
  • ...?

mberndt123 reacted with thumbs up emojimberndt123 reacted with heart emoji
@sideeffffect
Copy link
ContributorAuthor

Hello@SethTisue , could you please point me in the right direction how a PR like this can get merged?

@lrytzlrytz modified the milestones:2.13.16,2.13.17Nov 18, 2024
@lrytz
Copy link
Member

@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.

sideeffffect reacted with heart emojisideeffffect reacted with rocket emoji

@sideeffffect
Copy link
ContributorAuthor

Given that both 2.13.16 and 3.6.0 have been released, can this PR get reviewed, please?@lrytz

@sjrd
Copy link
Member

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.

@sideeffffect
Copy link
ContributorAuthor

I've described a use case for this herehttps://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?=> in Scala 3 becomes even more popular.

But I'd be happy to open a new thread on Contributors, soonish.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Projects
None yet
Milestone
2.13.17
Development

Successfully merging this pull request may close these issues.

5 participants
@sideeffffect@lrytz@sjrd@SethTisue@scala-jenkins

[8]ページ先頭

©2009-2025 Movatter.jp