3 ms·
I've been using Destucture [1] for a few years. It's an interesting compromise that works for atom and string keys because it's explicit, kind of like the sigil
by bryantwolf 2y ago
I've been using Destucture [1] for a few years. It's an interesting compromise that works for atom and string keys because it's explicit, kind of like the sigil approach. Though this seems way more streamlined, especially as someone who uses JS for front-end apps.
[1]https://github.com/danielberkompas/destructure/ https://github.com/danielberkompas/destructure/
- kzemek 2y agoOh nice, I didn't know about that one! It's interesting how many solutions are in this space; aside from Destructure[0] and shorter_maps[1] I also know about shorthand[2] and synex[3]. [0] https://github.com/danielberkompas/destructure https://github.com/danielberkompas/destructure [1] https://github.com/meyercm/shorter_maps https://github.com/meyercm/shorter_maps [2] https://hex.pm/packages/shorthand https://hex.pm/packages/shorthand [3] https://hex.pm/packages/synex https://hex.pm/packages/synex
- h0l0cube 2y agoI like this because it makes the sugaring distinct. Anyone unfamiliar with the sugar will know there's something different going on, while not really adding much noise.