-
Notifications
You must be signed in to change notification settings - Fork 23
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
Consider renaming apply to unpack #69
Comments
I agree naming conventions in Metal are far from ideal, but it's unclear to me what the best approach would be. One one hand, Metal follows the standard library by naming its algorithms after Since there doesn't seem to be a universal source of truth when it comes to naming these algorithms, I'd rather stick to the conventions used in the standard library. Now, to make things less surprising to someone coming from Hana, I could provide |
This is actually similar to the Fit library where
Its not just people coming from Hana, but also coming MPL, Fit, or Egg.
The surprise comes from using |
I understand the issue, the proposal to add The real problem at hand really boils down to changing the meaning of To avoid making hasty decisions, I'll leave this issue open and marked as a Question, so other users may chime in if they have any strong opinion on this naming convention. |
Well that's backwards. C++ has had a long history of using
Because of the confusion around |
Generally,
apply
is synonymous withinvoke
. MPL library usesapply
to invoke a metafunction or lambda. Boost.Hana'sapply
works just likestd::invoke
.However, your
apply
unpacks the elements of a list and then invokes the lambda, which I found to be surprising. It seems likeunpack
would be a better name and would avoid the confusion.The text was updated successfully, but these errors were encountered: