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

Keep in mind the specs were written to standardize the behaviour that existed at the time: there were implementations of memcpy that worked a bit faster because they didn't have to test for overlapping regions. That's why there's a separate memmove function in the first place.

So people saying that memcpy should work like memmove are really the ones advocating for changing a spec that is currently quite explicit.

Enabling this type invalid behavior from app code is a classic example of introducing dependencies on undocumented behavior. Over time these dependencies accumulate in complex systems with the resulting effect of increasing software incompatibilities, not reducing them.



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

Search: