Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I agree with you that negative lengths are not a good solution, but...

"One should just write correct code"

No one writes correct code, so our languages should be designed to avoid the possibility for mistakes to be made or go unnoticed. I'm wondering if the compiler in this case could have done more to inform the programmer of a possible bug. A 'this expression is likely to underflow' warning would have made a big difference I suspect.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: