March 17, 2014 Re: Replacement for Zip/Lockstep | ||||
---|---|---|---|---|
| ||||
Posted in reply to monarch_dodra | On 17/03/14 22:26, monarch_dodra wrote:
> "sync" actually went through my head. In the the context of programming, it
> could really mean anything, so I don't think its so good.
inStep, then?
|
March 18, 2014 Re: Replacement for Zip/Lockstep | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile | On Sunday, 16 March 2014 at 23:29:36 UTC, bearophile wrote:
> monarch_dodra:
> zip(A, B) is currently not nothrow, and this is bad. I suggest to give it the kind of iteration (shortest/longest/etc) as template argument. So the shortest (that I think should be the default, as now), can be specialized to be nothrow:
> https://d.puremagic.com/issues/show_bug.cgi?id=11913
I looked into this, and the only reason it throws is because `requireSameLength` same length does an `enforce` if you pop and empty range.
If think this is wrong, and should simply assert. `Zip` has an `empty` member, so nothing really justifies accepting a user calling pop on an empty Zip.
I'll try to solve this now.
|
Copyright © 1999-2021 by the D Language Foundation