Let's say that I want to get the first and last values of an array of arbitrary length, in a nice one-line statement. I could write
[first, middle..., last] = arr
But this is less than ideal from both a code efficiency standpoint and a readability standpoint, since I never use middle. What I'd prefer to write is simply
Do others agree that this should be allowed?
Let's say that I want to get the first and last values of an array of arbitrary length, in a nice one-line statement. I could write
But this is less than ideal from both a code efficiency standpoint and a readability standpoint, since I never use
middle. What I'd prefer to write is simplyDo others agree that this should be allowed?