Re:Rust for JavaScript Developers – Pattern Matching and Enums
by pininja on Sunday July 12, 2020 @11:43AM
(#23812156)
I appreciate the author’s use of code style to make it easier to read the examples. While JS is usually camelCase they choose to use snake_case for functions like operate_drone.
I also appreciate the lesson of converting discriminated unions in JS and to rust - that’s my favorite pattern from the TypeScript community.
I also appreciate the lesson of converting discriminated unions in JS and to rust - that’s my favorite pattern from the TypeScript community.