if it's a tuple, destructure it. If it's a list, operate on it atomically.
-
-
Replying to @ljharb @TheLarkInn and
I think it's probably too heavy handed for JS to say that indexing is an antipattern.
2 replies 0 retweets 1 like -
Replying to @wycats @TheLarkInn and
I agree, and .at(-1) would be great. I, however, am not JS :-)
1 reply 0 retweets 1 like -
-
Replying to @wycats @TheLarkInn and
nope but I'd prefer a more generic .at(n) that can take a negative index
1 reply 0 retweets 1 like -
Replying to @ljharb @TheLarkInn and
I think both are good. .at(-1) is an incantation for last,
#SayWhatYouMean1 reply 0 retweets 1 like -
Replying to @wycats @TheLarkInn and
sure but then we need .secondToLast()
3 replies 0 retweets 1 like -
Replying to @ljharb @TheLarkInn and
I don't think adding .last() argues for more. I'm a fan of .at()
2 replies 0 retweets 0 likes -
do we not like things that can do the same things? I'd rather see that then someone impl. own sugar.
1 reply 0 retweets 1 like -
Replying to @TheLarkInn @ljharb and
it's way to strong (and impossible) to demand One True Way to Do It.
1 reply 0 retweets 1 like
the Zen of Python demands one & only one way to do it & Py2 still ended up with two class systems.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.