Proposal: takeFront and takeBack
Tobias Pankrath
tobias at pankrath.net
Wed Jul 4 05:40:40 PDT 2012
> 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.
More information about the Digitalmars-d
mailing list