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

Refactor Language::Nodes::AbstractNode#initialize #4854

Open
rmosolgo opened this issue Feb 22, 2024 · 5 comments
Open

Refactor Language::Nodes::AbstractNode#initialize #4854

rmosolgo opened this issue Feb 22, 2024 · 5 comments
Milestone

Comments

@rmosolgo
Copy link
Owner

It uses keyword arguments which requires Ruby to allocate a Hash. (This is only for .new -> #initialize.) See #4718 (comment)

@tenderlove
Copy link
Contributor

If I can get this and this landed in Ruby 3.4, it will eliminate the hash allocation. If you like the kwargs, keep them! 😄

@rmosolgo
Copy link
Owner Author

Wow, that would be great. I'll keep an eye on those PRs, thanks!

@rmosolgo
Copy link
Owner Author

One of the two linked PRs to Ruby is merged... 🤞

@rmosolgo
Copy link
Owner Author

👋 Hey @tenderlove, are you still considering that PR to do Class#new in Ruby? I'm gearing up for GraphQL-Ruby 3.0 and I'll roll this breaking change to #initialize if necessary.

@tenderlove
Copy link
Contributor

👋 Hey @tenderlove, are you still considering that PR to do Class#new in Ruby? I'm gearing up for GraphQL-Ruby 3.0 and I'll roll this breaking change to #initialize if necessary.

I am, but there's been some blockers so I don't think I'll be able to get this merged until next year maybe. 😭

Please do what you think is best for GraphQL-Ruby and don't wait on me. I think we'll eventually get Ruby changed upstream, but it's going to take more time.

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

No branches or pull requests

2 participants