Skip to content

RFC: DistributionsBase.jl for packages defining custom distributions #1139

@tpapp

Description

@tpapp

Distributions.jl is a high-quality implementation of many commonly used distributions, benefiting from continuous contributions and peer review from the members of the Julia community.

While it is natural to contribute commonly used distributions to this package, some distributions may not be generic enough to warrant this (eg distributions used in a very narrow subfield, invented for a specific application and not in widespread use yet, etc). We should nevertheless make it easy for distributions living in other packages to share the API without incurring the cost of dependencies that are used by Distributions.jl. Of course, distributions from such packages could be migrated to this one later on if necessary.

I am proposing that a minimal API is extracted to a small, lightweight package, which could be called DistributionsBase.jl, defining the

  1. functions cdf, pdf, ... that operate on Distributions (from the current export list,

  2. a @reexport_DistributionsBase macro that reexports these, for use by packages to make it easy to maintain a consistent common exported interface.

I am not sure that I would export the type hierarchy in the first pass, as I don't think would be used commonly by packages defining custom distributions. In any case, I would start with the bare minimum, more can be added on demand later.

(related: #525)

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