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

I would agree with you. Stuff like `changeMotive` could just take a pointer rather then an index and then you wouldn't need it to be an array. More-over, if you still want to be able to do that loop to check for underflow/overflow at the end, you could just `union` it with an array - use the regular member variables throughout the code, and then use array at the end.

But it was written in 97 so personally I'd give him a break. It might be a style he picked-up from coding on some earlier projects where it made sense (Say, for speed, or because the compiler was garbage).



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

Search: