Bit of a #rust question:
As a bit of a quarantine project I'm working my way through the book "Writing an interpreter in go" but I'm writing it in rust. (Stops me copy-pasteing / skimming)
His AST data structure is based on interfaces that have standard properties and methods. I decided to use structs for this, but structs can only have methods.
Whats the best way to deal with this in rust? Is there a way to define standard properties in a type? Or should I use a mix of enums and traits?
Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.