Skip to content
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

[stdlib] Remove StringRef from python binding functions #3775

Closed

Conversation

martinvuyk
Copy link
Contributor

Remove StringRef from python binding functions.

CC: @ConnorGray I'd also like to deprecate .unsafe_cstr_ptr() in PR #3638

@martinvuyk martinvuyk requested a review from a team as a code owner November 15, 2024 20:07
Signed-off-by: martinvuyk <[email protected]>
@JoeLoser JoeLoser requested a review from ConnorGray November 15, 2024 20:24
Copy link
Collaborator

@ConnorGray ConnorGray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey Martin, thanks for tackling this! 🙂

Seeing all the places here where you needed to add an O: ImmutableOrigin parameter made me want to re-evaluate our current API design for StringSlice, to see if we can't avoid having to add so many new parameters (in this PR, and in existing usage of StringSlice).

I'm going play around with a couple design ideas, namely variations on removing the // from StringSlice so that the is_mutable parameter is no longer infer-only so that the mutability can be affixed directly as something like StringSlice[Immutable].

This is something we had before the language added infer-only parameters, but IMO in the case of is_mutable parameters, making them unspecifiable has this slight usability downside.

I'll report back here once that lands, and then see how it affects this PR and move forward with it 🙂

@skongum02 skongum02 deleted the branch modular:main January 29, 2025 18:58
@skongum02 skongum02 closed this Jan 29, 2025
@skongum02 skongum02 reopened this Jan 29, 2025
@skongum02 skongum02 changed the base branch from nightly to main January 29, 2025 20:44
@martinvuyk martinvuyk closed this Feb 1, 2025
@martinvuyk martinvuyk deleted the start-removing-stringref-from-python branch February 1, 2025 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants