To play devil's advocate,

I have dealt with -1 for years in network development among other places.
In just about every case, it has not been a problem. The only cases I can
think of where it has gotten weird in recent memory are badly designed API
such as the retry attempts because the API should have really been called
attempts... Why is this a big enough problem to invest in? C# a very new
language has added the same -1 behavior, so obviously it does not cause
major problems. While I support separate API for clarity, what justifies
the expense(time and testing)?? One might not call this a technical debt
issue, considering all the other users of this approach.

Again just playing devil's advocate here.

Thanks,
Mark



On Wed, Sep 6, 2017 at 3:26 PM, Anthony Baker <aba...@pivotal.io> wrote:

> Perfect!
>
> > On Sep 6, 2017, at 3:13 PM, Jacob Barrett <jbarr...@pivotal.io> wrote:
> >
> > And this is where the details are more useful than the abstract. I think
> if
> > we focus more on specific API methods and answer the questions for each
> or
> > those we will spend less time going back and forth on the use of sentinel
> > values.
> >
> > X.doSomethingUntil(10s); <- do something, give up after at least 10s
> > X.doSomething(); <- do something, never give up
> >
> > Very clear and no sentinel values.
> >
> > Y.doSomethingWithLimit(10); <- do it 10 times
> > Y.doSomething(); <- do it forever
> >
> > Very clear and no sentinel values.
> >
> > -Jake
> >
> >
> > On Wed, Sep 6, 2017 at 2:50 PM Anthony Baker <aba...@pivotal.io> wrote:
> >
> >>
> >>> On Sep 6, 2017, at 2:29 PM, Jacob Barrett <jbarr...@pivotal.io> wrote:
> >>>
> >>> Ok, I did not find that previous message at all clarifying but I did
> find
> >>> this one clarifying.
> >>
> >> I think the objective is to provide a clear and understandable API.
> >>
> >> IMO, a ReallyBigNumber is not easily readable.  Is the user’s intent to
> >> wait XXX time or forever?  Why not provide a constant value / enum to
> >> signal intent?
> >>
> >> There are so many usages of “0 as infinity” throughout the internets
> that
> >> I personally don’t find it all that confusing.
> >>
> >> Anthony
> >>
> >>
>
>

Reply via email to