go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I can't easily picture how you'd hammer it into the language without needing parser changes but an Haskell/ML/Erlang destructuring where things are pulled apart based on types and/or guard conditions and the like could be very interesting. You might also look at clojure for more inspiration that's a bit closer to the ES6 stuff (I believe). E.g. where you can have something like [{:keys [foo bar]} arg_map] which pulls the values at the named keys out of arg_map into vars named after the respective keys.
The cake is a lie. In reply to Re: RFC: Destructuring Assignment (aka Unpacking aka Type Patterns) in pure Perl
by Fletch
|
|