Proposal: takeFront and takeBack
dmitry.olsh at gmail.com
Wed Jul 4 07:06:56 PDT 2012
On 04-Jul-12 16:40, Tobias Pankrath wrote:
>> You have to maintain 2 version of you algorithm. This is more work to
>> test, to maintain, and it is likely to introduce more bugs.
>> More code == more bugs. More NPATH = more bugs and harder to test and
>> to maintain.
>> In addition, this will result in practice in less generic code,
>> because one may not need the version of the algorithm without consume
>> primitives in his/her own code and not code it at all.
> Since the performance problem seems mainly to materialize for string
> processing code an alternative to this proposal would be to add those
> functions only for strings. As far as I heared, most of phobos is
> already special cased for string so the maintenance overhead wouldn't be
> too big.
It would be nice to think ahead and account things like compressed
streams without extra state in range object. Anyway we are not about to
see them soon.
More information about the Digitalmars-d