Skip to content

Placeholders are not mentioned for destructuring assignment. #4800

Description

@gfldex

Problem or new feature

In /language/variables#index-entry-declaring_a_list_of_variables placeholder variables are not mentioned and the description in /language/signatures does not contain a reference to destructuring assignment.

Suggestions

my ($first-name, $, $lastname) = <Jean-Baptiste Emanuel Zorg>;

It is also possible to use a type-object instead of $ as a placeholder. However, currently this is not supported in v6.d (see: Rakudobug #6111)

Where-clauses are also supported in list-assigment.

my ($answer, $ where .Int > 1) = (42, π);

All cases are covered in Roast in numerous tests.

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation issue (primary issue type)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions