Skip to content

Drop .~ syntax entirely #825

Open
Open
@yebai

Description

@yebai

The .~ syntax allows one to define parameters in a vectorised manner:

x = Vector(undef, 4) 
x .~ Distribution()

#804 introduced extra constraints on the RHS: it has to be univariate distributions. This makes the need for the broadcasting syntax . questionable: it is much less flexible than Julia's broadcasting. So, using the broadcasting .~ might be confusing actually. I think we should further simplify vectorised tilde into

x = Vector(undef, 4) 
x ~ UnivariateDistribution()

This is semantically equivalent to x ~ filldist(UnivariateDistribution(), 4) but with a cleaner syntax. It also provides a clean syntax for supporting (univariate) identically-independently-distributed (IID) distributions discussed previously.

This proposal is also consistent with the Stan syntax for vectorised random variables.

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