3 ms·
That's true for me as well, but I learned these after many failures. Now, I start by writing enums and structs for the problem, then iterate the design with fun
by iex_xei 4y ago
That's true for me as well, but I learned these after many failures. Now, I start by writing enums and structs for the problem, then iterate the design with functions and if it's really needed add these functions as impl of a certain struct/enum. This is the inverse of "Object-Oriented" design where one has to start from interfaces and manipulate data to satisfy the interfaces.