You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi fasterthanlime, big fan here! i check your AoC answers to learn from them, i like how you solve them and the explaining is clear. however, i don't get why exactly why not just build the logic directly instead of implementing enums and structs. if you already have a blog, youtube video, explaining the thing, give me the link and don't waste your time.
The text was updated successfully, but these errors were encountered:
$ cargo c
Checking whytypes v0.1.0 (/Users/amos/bearcove/whytypes)
error[E0308]: mismatched types
--> src/main.rs:20:25
|
20 | person1.last_name = person2.first_name;| ----------------- ^^^^^^^^^^^^^^^^^^ expected `LastName`, found `FirstName`||| expected due to the type of this binding
This is a pretty contrived example, of course. But for example, I'd rather receive one of these:
structPoint3{x:f64,y:f64,z:f64,}
Than a (f64, f64, f64) or a [f64; 3].
Of course you wouldn't necessarily have to go through intermediate types like I do, but for me it's just how i think about problems. Once you find the right data structure, solving the problem itself becomes trivial.
hi fasterthanlime, big fan here! i check your AoC answers to learn from them, i like how you solve them and the explaining is clear. however, i don't get why exactly why not just build the logic directly instead of implementing enums and structs. if you already have a blog, youtube video, explaining the thing, give me the link and don't waste your time.
The text was updated successfully, but these errors were encountered: