3 ms·
(1) yes my way is clearer, side by side this is very obvious. Certainly it is not worse. (2) sure, but this doesn't change anything. Factoring a big ugly funct
by joshuamorton 4y ago
(1) yes my way is clearer, side by side this is very obvious. Certainly it is not worse.
(2) sure, but this doesn't change anything. Factoring a big ugly function out into two smaller easy functions is...fine, even if each is only used once. The name I picked wasn't to imply generalization, it was because I needed a name.
(3) yes.
But again the whole reason this is unreadable at all is because you've created an intentionally obtuse api. We're returning the row and column, so clearly either were able to index into this thing normally, or it's a temp we've created, in which case we can modify it's api and index into it normally.
- dataflow 4y ago> But again the whole reason this is unreadable at all is because you've created an intentionally obtuse api. [...] we can modify its API Do you never consume APIs you have no control over? And is every sequence you use an indexable list? And no, there was nothing intentionally obtuse in my comment. It was incredibly straightforward and readable code. We obviously disagree, but regardless, I don't enjoy the bad-faith accusations, so I'll stop here.
- joshuamorton 4y ago> Do you never consume APIs you have no control over? And is every sequence you use an indexable list? I already explained this. You're returning an index. There's no reason to do that unless.you can use the index. Somewhere, the api allowed you to use the index, so in this case, you've got control over the relevant parts of the api that don't! > And is every sequence you use an indexable list? Yes, or it's small enough that I can store or transform it into one, or it's big enough that I need to use specialized tooling that doesn't play well with break or continue. > It was incredibly straightforward and readable code I agree, there's nothing wrong with the code as written. It's fine. The obtuseness was the example. I'll reiterate: you're returning an index into some table. What are you going to do with that index, as you're claiming the table you pulled that index from cannot be indexed into for some reason? The code is fine, the example is obtuse.