Rust Tuple Hash Metaprogramming
That's how you do metaprogramming in Rust. doc.rust-lang.org/src/core/hash/... #rustlang #rust #tuple #hash #rustacean impl_hash_tuple! {} impl_hash_tuple! { A } impl_hash_tuple! { A B } impl_hash_tuple! { A B C } impl_hash_tuple! { A B C D } impl_hash_tuple! { A B C D E } impl_hash_tuple! { A B C D E F } impl_hash_tuple! { A B C D E F G } impl_hash_tuple! { A B C D E F G H } impl_hash_tuple! { A B C D E F G H I } impl_hash_tuple! { A B C D E F G H I J } impl_hash_tuple! { A B C D E F G H I J K } impl_hash_tuple! { A B C D E F G H I J K L }
A Twitter post jokes about Rust metaprogramming by showing a macro invocation repeated for tuples of increasing length, ending at twelve elements, next to the Rust crab mascot. The punchline is that the implementation handles tuple hashes through repetitive code generation rather than elegant general abstraction, making it a relatable programming joke about Rust's tuple trait implementations. This Twitter post jokes about Rust metaprogramming by showing a macro invocation repeated for tuples of increasing length, ending at twelve elements, next to the Rust crab mascot. The punchline is that the implementation handles tuple hashes through repetitive code generation rather than an elegant general abstraction, making it a relatable programming joke about Rust's tuple trait implementations.
- @profunctor_io / 5942 2020-12-05
- @ithueti / 3306 2020-12-05
- Type
- image
- Size
- 800×687 · 88.7 KiB
- Mood
- sarcastic, nerdy
- Language
- en
- Added