“The Expressive C++17 Coding Challenge (in Rust)” Revisited
In October of last year, I wrote a post, “The Expressive C++17 Coding Challenge (in Rust)”. For various reasons, it got brought up again in the D world, and seb has written a new post. It’s good, you should check it out!
However, it links to my gist, not my blog post. As I said back then:
I held myself to the same constraints as the original contest; no external packages is a bit painful in Rust, but it’s not too bad. Mostly it would let me eliminate boilerplate while also improving correctness, and making the code a bit shorter.
So, that got me thinking: What would this look like if I could use external packages? I took about an hour, and knocked it out. I have two versions to show you today, one where I pay no attention to allocations, and one where it’s zero-allocation.
First, the “whatever just allocate” version:
extern crate csv; #[macro_use] extern crate serde_derive; extern
Continue reading →