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

Add Val helper functions #15937

Open
alice-i-cecile opened this issue Oct 15, 2024 · 2 comments
Open

Add Val helper functions #15937

alice-i-cecile opened this issue Oct 15, 2024 · 2 comments
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets D-Straightforward Simple bug fixes and API improvements, docs, test and examples M-Needs-Release-Note Work that should be called out in the blog due to impact S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! X-Blessed Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers
Milestone

Comments

@alice-i-cecile
Copy link
Member

          I'm closing this in favor of `px(10.)`-style helper functions (or alternatively, exporting `Val::Px` as `Px()` in the prelude)

Originally posted by @cart in #15825 (comment)

@alice-i-cecile
Copy link
Member Author

@ickshonpe has a great summary of why the free functions are better than just exporting Val::* here: #15943 (review)

@alice-i-cecile alice-i-cecile added A-UI Graphical user interfaces, styles, layouts, and widgets S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! M-Needs-Release-Note Work that should be called out in the blog due to impact X-Blessed Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Oct 16, 2024
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Oct 16, 2024
@cart
Copy link
Member

cart commented Oct 17, 2024

I'll note that accepting the AsValNum trait as a generic input suffers from the same problem that the extension method suffers from (not playing well with function reflection).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets D-Straightforward Simple bug fixes and API improvements, docs, test and examples M-Needs-Release-Note Work that should be called out in the blog due to impact S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! X-Blessed Has a large architectural impact or tradeoffs, but the design has been endorsed by decision makers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants