Re:‘~’ is being removed from Rust
by stream_fusion on Saturday May 03, 2014 @07:14AM
(#7690337)
Does this change pattern matching syntax of recursive data structures, if every node is an explicit box type? Could be cumbersome for matching parse-trees?
[ Parent
| on HN ]
Re:‘~’ is being removed from Rust
by loup-vaillant on Saturday May 03, 2014 @08:38AM
(#7690539)
I have read that is doesn't change a thing. Maybe it's even more concise.
From what I have read, there is a general mechanism for pattern matching: let the custom data structure implement a "pattern match" method or something, which is then implicitly called with the pattern matching syntax. The explicit box type would be no different.
My guess is, parse-trees would be just as easy to match.