3 ms·
Personally, I just find `some_array.has_my_thing?(thing)` to be more readable, and I spend way more time reading code than writing it.
by sparker72678 5y ago
Personally, I just find `some_array.has_my_thing?(thing)` to be more readable, and I spend way more time reading code than writing it.
- ajmurmann 5y agoI think this might be hosting complexity which reminds me a little of Rich Hickey's Simple Made Easy talk. The Rails way seems more readable because it's hiding complexity. The other approach reveals the complexity, but actually has less complexity than the Rails style solution. This might only become apparent when something goes wrong.