Skip to content

Proposal: merge cats-time into cats #3766

@diesalbla

Description

@diesalbla

cats-time is a microlibrary that implements instances of kernel typeclasses, such as Show, Ord, Eq, or Hash, for the classes of the java.time package. This package was introduced in version 8.0 of the JDK, in order to replace previous unsatisfactory classes (such as java.Date), and was derived from joda-time.

The proposal is that these files be merged into the kernel package, and the cats-time library archived.

Some considerations on this matter are as follows:

  • Precedent: there is a trait of instances for java.util.UUID already in kernel.
  • java.time is just as standard a library as Option, Either, so it is reasonable to also include its instances in the package.
  • Adding instances for a JDK-specific class would add a coupling between cats and the JVM platform specifically, but as mentioned that already happens with java.util.UUID.
  • This would make the cats kernel incompatible with JDK pre-8 versions. The existing instance for UUID only adds incompatibility with pre-1.5 JDKs. Note that JDK 8 was released in March 2014, almost seven years ago, so I am not sure how far cats retrocompatibility should go.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions