3 ms·
For touted Go simplicity, this looks messy and hard to read. Look at Rust iterators which are just simple and readable ‘next() -> Option<Item>’ that can be tar
by neonsunset 2y ago
For touted Go simplicity, this looks messy and hard to read.
Look at Rust iterators which are just simple and readable ‘next() -> Option<Item>’ that can be targeted with ‘for item in iter’ and chained iterator expressions or C#’s yield return or IEnumerator<T> (which support cleanup on panic too) which works with foreach and the same kind of chaining. Both are faster, easier to read and write too.