Skip to content

Allow .~ infix operator #30341

Closed
Closed
@cscherrer

Description

@cscherrer

~ is standard notation for statistical distributions, for example x ~ Normal(0,1). Because of this, it's a natural choice for probabilistic programming DSLs like Soss.jl and Turing.jl.

It would be convenient to allow this notation to be broadcast in the usual way, for example allowing x .~ Normal(0,1). But this currently seems to be disallowed:

julia> :(x .~ Normal(0,1))
ERROR: syntax: missing comma or ) in argument list

@StefanKarpinski suggested I open an issue to request this be changed:
cscherrer/Soss.jl#14 (comment)

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureIndicates new feature / enhancement requestshelp wantedIndicates that a maintainer wants help on an issue or pull requestparserLanguage parsing and surface syntax

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions