Why can classes have multiple definitions across translation units but not functions even when the function definitions are identical? My idea is that the reason for this can be one of two things: it goes against some compiler/linker enforced design principle, or it causes an actual technical error when compiling and linking.
I can maybe understand why this would be a design principle error. It would be irresponsible to have the same function with the same params and different definitions defined in multiple places, but why should an error be thrown for functions that are identical in every way but defined in multiple places? These same qualities could be had by a class and no linking error would occur. Is this some consequence of how classes and functions are handled differently internally or what?
Don't be scared to get as technical as you'd like. I probably wont feel comfortable moving on from this nagging question unless I have a full answer anyway.