Hacker News new | ask | show | jobs
by Rotareti 3045 days ago
> Especially how Rust enums and structs make it easy to define new types to guide your programs are a highlight for me.

In recent versions Python got some nice improvements in this area, with the new way of creating NamedTuples, Data Classes and the typing module. I wrote a stackoverflow answer recently that sums it up, if anyone is interested:

https://stackoverflow.com/a/45426493/1612318

2 comments

Those artifacts in Python don't really compare with what the parent laments. Rust's sum types are one of my top reasons for preferring the language.
There are not sum types though.