3 ms·
A possible match would be the Typestate aka Type State pattern. For some reason I only see Rustaceans talking about it, though it's perfectly applicable in any
by jacques_chester 3y ago
A possible match would be the Typestate aka Type State pattern.
For some reason I only see Rustaceans talking about it, though it's perfectly applicable in any language with static typing.
- frodowtf 3y agoIf you want to use this pattern, you'll probably end up with a lot of duplicated code e.g. for SQL query builders. I could imagine that Rust makes this kind of pattern easier due to traits and macros. A lot of languages do not have these features. And then of course Rust people care about correctness more in general.