Hacker News new | past | comments | ask | show | jobs | submit login

An interesting thing about the old system is that it could have checked data types just fine. This would have required linker support, but in the early years C didn't have the influence to make that happen. It would have been the tail wagging the dog. Linkers were designed for other languages, then used by C.

With linker support, C++ would never have had to resort to name mangling.

The foo(i,j) in your example could have caused the compiler to emit assembly directives to specify the argument types and return type. The assembler could have put these into the object file. The linker could have checked for compatibility when linking. The linker could have produced warnings, errors, or in some cases even thunks.




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

Search: