Skip to content

Remove prohibition on length-1 tuples#1609

Open
WardBrian wants to merge 3 commits intomasterfrom
feat/1518-length-one-tuples
Open

Remove prohibition on length-1 tuples#1609
WardBrian wants to merge 3 commits intomasterfrom
feat/1518-length-one-tuples

Conversation

@WardBrian
Copy link
Member

Closes #1518. This PR implements the the proposed version that adds a syntax with a trailing comma in both type definitions and expressions.

Submission Checklist

  • Run unit tests
  • Documentation
    • If a user-facing facing change was made, the documentation PR is here: TBD

Release notes

Length-1 tuples can now be declared using a trailing comma, e.g. tuple(real, ) x = (3.14, );. This is primarily valuable for using tuples with the embedded laplace approximation feature, which uses tuples to pass arguments to user-defined callbacks.

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to
license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prohibition on length-1 tuples can make laplace functions annoying to use

1 participant