2 ms·
> L is not trying to be cool, it's trying to be useful and easy to review. I appreciate that, but your compiler checks the types anyway, so later n .= "abc" wi
by acqq 16y ago
> L is not trying to be cool, it's trying to be useful and easy to review.
I appreciate that, but your compiler checks the types anyway, so later n .= "abc" will be an error if I understand it, that's why you have them, so if the code you review compiles without error you certainly won't catch any new error when using eyes?
- luckydude 16y agoThe types help enormously, but so does being slightly verbose. Lots of "reviews" happen in diffs. Much like Linus reads patches and modifies the patches because he knows the source base, we read commit messages (which are a patch) and the first review frequently happens in email. Which doesn't address your point, I realize. Let's try this. Given the choice between make life better for the writer (n := 1 is shorter) and the reader (int n = 1 is more explicit), we pick the reader every time. We have multiple readers and we work in multiple languages. So while you are absolutely right, n := 1 is just fine, and it is type checked and it is "obvious", it will hiccup anyone coming from C (and is about to switch back to C after this review). We review everything. And the review is just part of it, when a support call comes in we're in the source, looking at the code, trying to make the customer happy with an instant fix (which we do a lot). Every second that we have to spend swapping in tcl syntax is time where the customer is going "why am I paying for this when I could use git for free?". And a few second later they find out when get them a fix. Time matters. Ease of reading yields shorter time on support and shorter time on reviews. That's my take, and that's how it works here. That may not be true for you.