Skip to content

JBIND/JMATCH: better optional value syntax (default values? nested destructuring?) #8

@aartaka

Description

@aartaka

Right now, jbind/jmatch destructuring patterns can contain the (var &optional var-p) list to denote an optional object property or array element. However, this syntax doesn't allow providing default value for the case this optional value is not provided. CL-native optional arguments allow that, and it's useful.

So the syntax should be extended to

(var &optional default-value var-p)

It's not backwards-compatible, so it can only happen on the next major release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backwards-incompatibleBackwards-incompatible changes for next major release.bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions