Skip to content

Add destructoring #18

@FraMecca

Description

@FraMecca

"Destructuring" is a visually concise way of extracting fields from a data structure.
https://reasonml.github.io/docs/en/destructuring.html

There are already utilities libraries that add destructuring (let/tie):
https://github.com/valmat/vest#tie
https://github.com/SirTony/dext/blob/master/src/dext/let.d

But I think there would be value in having a @safe-capable destructoring template in ddash given that ddash is a bigger utility library than the other two and that there situations in which you want to be conservative with dependecies.

I see that ddash already has destructInto but it does not support:

  • associative arrays
  • tuples (at least as I understand from the example)
  • POD

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions