4 ms·
I think the header-file and source-file distinction was more of an architectural decision (so that you could implement an efficient compiling and linking system
by thedigitalengel 16y ago
I think the header-file and source-file distinction was more of an architectural decision (so that you could implement an efficient compiling and linking system) than a language design decision.
Just an opinion, though.
- exit 16y agoof course it was architectural, but that's precisely the problem - why are we still using a language designed for an age of computational scarcity? another example: functions should be virtual by default.
- tbrownaw 16y agoanother example: functions should be virtual by default. No no no! C++ got this one right, and then C# did better ('virtual' to declare a virtual/overridable function in the base class, and 'override' to replace it in the subclass). http://www.artima.com/intv/nonvirtual.html http://www.artima.com/intv/nonvirtual.html Every time you say virtual in an API, you are creating a call back hook. As an OS or API framework designer, you've got to be real careful about that. You don't want users overriding and hooking at any arbitrary point in an API, because you cannot necessarily make those promises. And people may not fully understand the promises they are making when they make something virtual.