by pingyong · 6y ago · 0 comments
Although even if there somehow are hard questions, I'm not sure understanding unsigned arithmetic would have helped whoever wrote that code. Because I think if you asked that person "what does this unsigned type do with -5 C?" the answer would have been pretty obvious.
I have been coding since the mid-80's and I wouldn't definitely assert that I know it well, without having a look into ISO C standard and the semantic expectations of the abstract C machine and implementation specific behaviors.
This might have been a factor here, given that most of Gosling's peers back then were probably still more familiar with K&R C and its different set of conversion rules.
But more subtle when you have: a.size() - 1 < len