4 ms·
This is yet another problem caused by the fact compilers have a 'file in, file out' interface. (the other problem is performance of the compilation/linking/p
by toolslive 11y ago
This is yet another problem caused by the fact compilers have a 'file in, file out' interface.
(the other problem is performance of
the compilation/linking/packaging process). There's simply no reason why input to a compiler should be a file, and no reason why the result should be one.
- dgellow 11y agoCould you be more explicit? What do you want instead of a file?
- toolslive 11y agoSuppose the IDE has the code in memory, it wants it compiled (or syntax checked, or ...). Currently, it needs to write out a file, then call the compiler, and pick up the result from the file system, and parse the result. Ideal, would be a programmer's API to do this. But a compilation service, with RPC calls would already be a major improvement. Also, if you store code, intermediate results, dependencies, ..., in a database (could even be in memory), you can reuse these intermediate results. The dependency graph can guide you to decide what needs to be changed etc.
- im_down_w_otp 11y agoI'm not seeing the problem. You can already pipe inputs to the compiler, and those inputs don't have to be from a file on-disk, they can just be fed over stdin. Several compilers, including GCC, support using in-memory only movement of interstitial data between compilation phases instead of using intermediate temp files.
- jmnicolas 11y agoCan you give some examples of what we could pass to a compiler that is not a file ?