Quantcast
Channel: Ruby Issue Tracking System: shevegen (Robert A. Heiler)
Viewing all articles
Browse latest Browse all 100

Ruby master - Feature #16899: Add method `Array#both_end`

$
0
0

I think #first_last would be a better name as well; primary reason being that we
already have #first and #last.

I am also ok with the proposal itself, although I think I have not had a need to
use this often. But I don't mind such a method existing.

#extremes is a bit of a strange name though. It reminds me of mathematics.

#bookends for some reason reminds me of a bookworm - no idea why. :)

#both_end and #both_ends are a bit strange as names. I think one problem here
is that the name implies "ends", but we also have #first and #last, and I am
not sure if both first, and last, can be considered as two ends? What about
circular arrays? :P

So I think #first_last would be a better name. (A single name might be better
but it is harder to find a goot name there.)


Viewing all articles
Browse latest Browse all 100

Trending Articles