There's no reason to make a bad api in Java just because it is Java :-)


On Tue, Nov 26, 2013 at 11:21 AM, samuelgruetter
<notifications@github.com>wrote:

> In rxjava-core/src/main/java/rx/util/TimeSpan.java:
>
> > +package rx.util;
> > +
> > +import java.util.concurrent.TimeUnit;
> > +
> > +/**
> > + * Represents a time value and time unit.
> > + * <p>
> > + * Rx.NET note: System.TimeSpan has a fixed unit of measure of 100 nanoseconds
> > + * per value; the Java way is to specify the TimeUnit along with the time value.
> > + * <p>
> > + * Usage:
> > + * <pre>
> > + * TimeSpan oneSecond = TimeSpan.of(1, TimeUnit.SECONDS);
> > + * </pre>
> > + */
> > +public final class TimeSpan implements Comparable<TimeSpan> {
>
> Java code using Observables is bulky anyways because of anonymous
> functions, so it doesn't matter if durations are ugly, too ;-) I think
> RxJava's "mission" should be the a base compatible with everything, and
> will mostly be used from other languages. In Scala, for instance, we use
> Duration<http://www.scala-lang.org/api/current/index.html#scala.concurrent.duration.Duration>,
> and I'm very happy that it is compatible with TimeUnit. So I'd say first
> priority is compatibility, second is that it's "nice". But if someone comes
> with a solution which provides both, all the better.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Netflix/RxJava/pull/509/files#r7936030>
> .
>