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
av_len documentation #13377
Comments
From root@mail.nethype.deCreated by root@mail.nethype.deThe av_len documentation for 5.18.1 says: Note that the return value is +1 what its name implies it returns; and That seems wrong. Shouldn't it be: Note that the return value +1 is what its name implies it returns Or maybe even less confusing: Note that, unlike the name implies, it returns the highest index in the array, so to get the size Perl Info
|
From @tseeOn 10/27/2013 10:56 PM, root@mail.nethype.de (via RT) wrote:
That sounds like and improvement to me. --Steffen |
The RT System itself - Status changed from 'new' to 'open' |
From @bulk88On Sun Oct 27 14:56:41 2013, root@mail.nethype.de wrote:
Didn't KHW already fix this issue in these couple of commits earlier this year starting at http://perl5.git.perl.org/perl.git/23aa77bc9fa488ace3ef1089104e999c23821171 ? -- |
From schmorp@schmorp.deOn Sun, Oct 27, 2013 at 10:48:07PM -0700, bulk88 via RT <perlbug-followup@perl.org> wrote:
If the idea is to deprecate it's use (which these changes kind of seem -- |
From @khwilliamsonOn 10/27/2013 03:56 PM, root@mail.nethype.de (via RT) wrote:
I wrote the original text. I realize that I do not have the talent to In your first proposal, the word 'is' is missing, so it is not correct I like your second proposal, but again, I think it useful to contrast |
From @khwilliamsonOn 10/28/2013 02:08 AM, Marc Lehmann wrote:
I thought it wrong to deprecate this, because I imagine that this is I wrote a patch to remove all uses of av_len from the core, but I never |
From @maukeOn 30.10.2013 06:27, Karl Williamson wrote:
"Note that the return value is +1 what its name implies it returns." Its name implies that it returns 5 for a length 5 array. The
No, it's not. "Note that the return value +1 is what its name implies it returns." Its name implies it returns 5 for a length 5 array. The sentence says
Sure, but that seems orthogonal to the problem at hand. How about this Note that, unlike the name implies, it returns the highest index in the -- |
From @bulk88On Tue Oct 29 22:27:41 2013, public@khwilliamson.com wrote:
Since av_len is av_top_index, they should share the same docs. I like the "The Perl equivalent for this is C<$#myarray>." in av_top_index and I'd like to see that in av_len. $# (or directly what the C function means in Perl) is the fastest way to realize what the C function does. The opposite of that is C<scalar(@myarray)>, which is what av_len does NOT do. -- |
From schmorp@schmorp.deOn Tue, Oct 29, 2013 at 11:31:10PM -0600, Karl Williamson <public@khwilliamson.com> wrote:
It's only my opinion, but introducing two extra names without deprecating (I read a lot more code than I write, and I think thats quite typical for I agree that if av_len isn't deprecated, all three should share the same -- |
From @khwilliamsonOn Wed Oct 30 02:01:24 2013, bulk88 wrote:
I pushed commit b985ae6, attached, that I believe incorporates the suggested changes. I've taken this ticket, and if I don't hear otherwise, will close it after a month |
From @bulk88On Sat May 31 18:19:20 2014, khw wrote:
The commit above doesnt mention C<$#myarray> at all. Also nothing was attached to your RT post. -- |
From @khwilliamsonOn 06/01/2014 01:23 AM, bulk88 via RT wrote:
Sorry, I forgot to attach, but it turns out that it wasn't so helpful People wanted the documentation to be in terms of just one of the "The Perl equivalent for this is C<$#myarray>." I would entertain a patch to add something like this text to the av_len |
From @khwilliamsonI still would entertain a patch as mentioned above. But I don't think there is any need to keep this ticket open -- |
@khwilliamson - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#120386 (status was 'resolved')
Searchable as RT120386$
The text was updated successfully, but these errors were encountered: