2 ms·
This is basically an eternal battle when teaching. Personally I prefer to try and stay to only idiomatic code if at all possible, but there's pros and cons to e
by steveklabnik 4y ago
This is basically an eternal battle when teaching. Personally I prefer to try and stay to only idiomatic code if at all possible, but there's pros and cons to each approach.
(This is one reason why I'm glad other people are also writing books! Not everyone likes my style!)
- stouset 4y agoOr when necessary, use the verbose approach to lead toward and explain the idiomatic approach!
- steveklabnik 4y agoEven then: code examples get copied. People go "oh this works for me" and don't bother reading on to the better approach. It's tough :)