API design: (start,length) vs (start,end)

Julian Hyde julianhyde at gmail.com
Tue Nov 20 10:30:40 PST 2012


On Nov 20, 2012, at 10:23 AM, Per Bothner <per at bothner.com> wrote:

> The Java APIs have many methods that select a slice of a
> sequence or an array, but there is no consistency as to
> how to specify the slice: Many places uses (fromIndex,
> toIndex), and many other places uses (fromIndex,length).

Good point. Every language I use (e.g. Java, awk, SQL), I have to consult the manual on the substr/substring function, for the same reason.

Julian


More information about the lambda-dev mailing list