rskar-git
rskar-git
If find this to be so uncompelling, and potentially confusing for the purposes of understanding what meaning `Index` is meant to convey. If anything, it only tracks the apparent sort...
>It has nothing to do with the original index why would you assume that it was? Because the proposal illustrated its use case like so: `For Each x As t...
>I say again it has nothing to do with indexer or IList. (The only person confusing it is you.) I say again it isn't only me who mentioned this confusion....
@gilfusion >If the language supported those scenarios, making one of those collections return an index would be simple. However, by definition, a "Collection" does not imply an index. You'll note...
@pricerc Obviously, the given example is way too trivial to illustrate the need, and can already be done efficiently in today's VB, like so: Dim A = {1, 2, 3}...
For what it's worth, this is possible in VB today: Dim A = {1, 2, 3} With A.AsSpan().GetEnumerator() Do While .MoveNext() Call Sub(ByRef item As Integer) item += 1 End...
@WalterLederer That is a valiant try, but I'm with @VBAndCs on this, the WithIndex/Index_ concept is very memory heavy, especially in regard to (non-trivially sized) value-types. Also, it imposes two...
> [concept is very memory heavy] ... [It captures a copy of an element] ... Fixed, see below Dropping the `Private _value As T` part does improve things. However, VB...
> In all other cases, you should define your types as classes. Absolutely agree! Most of the time. In any case, a `For Each` scenario upon a collection of `Class`...
@WalterLederer > Because I extended my example... There were folks who indicated interest in #525, but if anyone demonstrated a compelling use-case there, then I missed that. The only reason...