3 ms·
I found the alternative easier to read. I read it once. I had to scan yours twice. I'd say yours is borderline simple case. Also, i think part of the differ
by ironchef 15y ago
I found the alternative easier to read. I read it once. I had to scan yours twice. I'd say yours is borderline simple case.
Also, i think part of the difference can be found when you're dealing with large amounts of code in maintenance. I'd much rather read something dead simple (if somewhat verbose) than something that makes me think at all (another example here would be (in the ruby world) use of !unless).
Like anything that has to do with taste, to each their own (i prefer a vinegary bbq while you might like a smokier bbq)
- RyanMcGreal 15y agoI didn't like list comprehensions when I first encountered them, but after getting accustomed to them, I now strongly prefer to write and read a comprehension over a for-in loop.
- ironchef 15y agoI agree, but it depends on how complex the operation within the comprehension is.