Tech
How Reading a Design Patterns Book Led Me to Audit My Rust Framework with UML and Merise
I was reading a design patterns book. I got to the UML class diagrams — and I stopped.
Because the diagram on the page was describing something Rust already says in its own syntax. A struct is a class. Option<T> is a 0..1 association. Vec<T> is 1..N . Ownership is composition. The formalism I was looking at, drawn as boxes and diamonds, was the same information the compiler already had — just in a different notation.
Which led to an uncomfortable thought. If the type s...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to