You don't have to do so now either, with section based smartlinking.Josep Roca wrote:> I don't see what all this adds/improves, except making a proven solution slower.
1.- You get dead code removal without having to compile each separate procedure as an object file.
No change at all. The changes that you have to make to the compiler to discard unused classes are in the same code as to properly prepare them for sections based smartlinking (if not done already for FB)2.- You also get dead code removal with classes (types).
Without that, you can do that too, it is just that you need to trigger a build in some cases (either due to a smart IDE or manually if you are a Paleo). And you get the compile speed advantages in all the cases where you just fix a typo.3.- You can use conditional compilation and also macros.
Then just force a build on every compile in the current system. Your solution will be about the same speed, so that doesn't matter.4.- You don't need to rebuild libraires each time that you make a change. Since we are working with source code, just change it.
Same, just force a build. It will be slow, but you can clean everything out between builds to avoid state.5.- The same code works with 32 and 64 bit. No need to build separate libraries for both.
Well, first of all, separate import libraries are not needed at all, and most commercial compilers (and e.g. Free Pascal) generate what they contain them on the fly when linking. The fact that gcc needs them is a remnant of the first ports of Unix compilers to windows that got never really eliminated.6.- No need for import libraries.
This is simply not true. Libraries are still much, much faster. Both because there is less I/O and directory searching needed, as well that the representation is read, parsed etc. Libraries are managed as arrays of sections that can be fixed up really cheaply. Easily hundreds of times faster as compiling the same source (and then the I/O bits are on top of that).With modern computers, only the first time that you use the include files is the compilation a bit slower. Then, as they're in the caché, compilation is as fast as using libraries.
p.s. I realized that module in this context is a complex concept. A full module system (like e.g. Free Pascal)works also on language level, including errormessage generation, automatic recompilation on changes and namespaces,while a minimal compilation unit system (like C has) only works on linking level. For a descriptions just search for "module system" or "unit system" on this forum