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

I'm not sure I get the argument here. So long as the input-output mapping for the function is identical, it cannot change the benavior of the program. This is what I would consider safe.

The semantics of values are irrelevant because the function will behave identically regardless of those semantics.



This only true if the type describes the whole meaning of the values. If the exit code of a unix program changes from 0 to 1 it still returns an int, but the meaning of that value is completely different one.


But the exit code can't change from 0 to 1. For any given input to the Unix program, if the output was 0 with one implementation, then it would always remain 0 with any other _equivalent_ implementation.

This is literally what is meant by "returns the same values for the same arguments". Any function that fits this description, by definition, cannot suffer from the problem you are describing.




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

Search: