3 ms·
I think he used p_rite so that the variable names length is identical to p_read, which can make the code look more pretty.
by ComSubVie 16y ago
I think he used p_rite so that the variable names length is identical to p_read, which can make the code look more pretty.
- aquark 16y agoI like having the variables the same length from an aesthetic point, but my brain also flags 'rite' as being spelled wrong and that detracts (albeit slightly) from reading and understanding the code.
- roel_v 16y agoYes that's what I figured, but still that's only in one place (in the declaration).
- jemfinch 16y agoIn that case, I'd suggest `p_rd` (well, IMO, just `rd` would suffice) and `p_wr`. Then they're both fairly unambiguous abbreviations.
- dkersten 16y agoI think p_wt is better than p_wr. Honestly though, aligning the length of variable names is, in my humble opinion, retarded - he should have went for p_read and p_write.
- nickelplate 16y ago"aligning the length of variable names is, in my humble opinion, retarded" I feel the same way.
- deleted 16y ago[deleted]
- ori_b 16y agoI'd probably go with just 'r' and 'w', or 'src' and 'dst'
- pavel_lishin 16y agoYes, but less readable. This is a trivial, sure, but I really dislike seeing misspelled variables. My favorite, of course, is $cue, which usually (but not always) means that the variable in question is related to a queue.
- Groxx 16y agoand more ambiguous if attempting to read quickly. "p_r" is the same on both, and they're the same length, it'd be easy to confuse one for the other.