-
Notifications
You must be signed in to change notification settings - Fork 530
Add Type::getLastIterableValueType()
#1811
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
Conversation
04e88a4
to
4e5af92
Compare
2a79d0c
to
c4bb029
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This totally makes sense to me. Maybe we could tackle first value at the same time? Thanks 😊
1f88a93
to
5bffea3
Compare
BTW a random thought - don't feel obligated to get the design right the first time, it doesn't have to be perfect 😊 We'll eventually deprecate some of the new methods anyway, as we come up with better alternatives 😊 |
Yes. But you know, it is very important that they are sorted in the right order 😅 |
5f3f89a
to
594e613
Compare
594e613
to
401b2f5
Compare
I saw a couple more cases like this one, expect more PRs :) I'll look at the complex ones at the end |
this is ready and I'm eager to add a couple more 😊 |
Thank you :) |
just playing around, kind of POC for moving more array-related methods to
Type
which I mentioned in #1801 (comment). I'm not sure about this or if this should be the direction to move forward for other array return type extensions too..What I like
ArrayPopFunctionReturnTypeExtension
. I actually love thatWhat I dislike
array_pop
in particularflip()
be called on Type and what do people expect it to do ..MaybeIterableTypeTrait
andNonIterableTypeTrait
which are kind of related to the new array type traits IMOMost likely this is the best-case example and others will be more complicated to move over.
This PR is really mostly just for discussing this to not do this in other PRs that are not related :)