Skip to content

Make Named Tuples a stable feature in 3.7 #22753

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

Merged
merged 6 commits into from
Mar 10, 2025

Conversation

WojciechMazur
Copy link
Contributor

We make the Named Tuples again a standard feature, after they were delayed before 3.6 release #22045

Includes fixes to make deprecated syntax warnings and its migration still work - in many cases untpd.Tuple has become untpd.Parens

@WojciechMazur WojciechMazur changed the title Stablize/named tuples Makes Named Tuples a stable feature in 3.7 Mar 9, 2025
@WojciechMazur WojciechMazur added release-notes Should be mentioned in the release notes needs-minor-release This PR cannot be merged until the next minor release labels Mar 9, 2025
@WojciechMazur WojciechMazur marked this pull request as ready for review March 9, 2025 21:02
@Ichoran
Copy link

Ichoran commented Mar 9, 2025

It would be helpful to have, somewhere (ideally in a link from the PR that re-establishes it as not-experimental), a link to significant uses of named tuples. I've tried using them and it's not clear to me that they're pulling their weight at least with the loads I'm trying to haul. But others may have had a more appropriate use-case.

If the only bar is "this isn't so obviously broken as to be useless", the bar is well-cleared by now. But if the desired bar is "the advantages of the feature are worth the complexity", it would be nice to have it better documented that this is the case. (Of course it's something of a chicken-and-egg situation because people don't use experimental features as much in case they're dropped.)

@bishabosha
Copy link
Member

bishabosha commented Mar 9, 2025

@Ichoran I will unprivate before my Scalar talk, but I've prepared a webapp using named tuples for typed dataframe, server endpoints, json serialisation, ORM.
I'd like to push for wrapping over foreign memory api but not had time yet.
Also I wanted to do a config parser but I think the concept needs a redesign due to the lack of possibility for recursion.

@Ichoran
Copy link

Ichoran commented Mar 10, 2025

I will be interested to see the typed dataframe implementation! That was one of my use cases too, and I wasn't happy with the ergonomics and safety of same-typed differently-named columns among other things. But I may not have chosen the best design.

@WojciechMazur WojciechMazur changed the title Makes Named Tuples a stable feature in 3.7 Make Named Tuples a stable feature in 3.7 Mar 10, 2025
Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

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

LGTM

@odersky odersky merged commit cce70da into scala:main Mar 10, 2025
29 checks passed
@WojciechMazur WojciechMazur deleted the stablize/named-tuples branch March 10, 2025 12:10
@WojciechMazur WojciechMazur added this to the 3.7.0 milestone Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-minor-release This PR cannot be merged until the next minor release release-notes Should be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants