5 ms·
Rust ADTs and pattern matching are so much better than other mainstream languages I find that once my code compiles it actually is almost always correct. The n
by abrgr 3y ago
Rust ADTs and pattern matching are so much better than other mainstream languages I find that once my code compiles it actually is almost always correct.
The next step is to encode your transition logic in the From impls between the enum structs and you've got yourself a first-rate state machine.
- zozbot234 3y ago> Rust ADTs and pattern matching are so much better than other mainstream languages Pascal and Delphi have always had variant records as part of the language. Are these not "mainstream" enough, especially Delphi?
- diarrhea 3y agoUuugh, no. Not anymore at least.
- LoganDark 3y agoThose languages have other issues that make them weird to use. Rust has its fair share of weirdness as well, but most of that weirdness is just a direct side effect of the way that it is.
- Klonoar 3y agoNeither has been mainstream in years.
- metaltyphoon 3y agoI wish it had nested object destructions like C# has. The best part of it all is that it can return expressions.