DMD Source Archive - Why?
Walter Bright
newshound2 at digitalmars.com
Sun Apr 14 06:04:02 UTC 2024
On 4/11/2024 8:28 AM, Steven Schveighoffer wrote:
> Think of why we use standard object formats instead of our own format (which
> would allow much more tight integration with the language).
We use standard object formats because we don't have a linker. I've spent a lot
of time trying to understand their byzantine structure. It's not fun work.
I mentioned that the archive support can be pluggable. It's only two functions
with a generic interface to them. If we aren't going to move forward with source
archives, it would be a giant waste of time to learn .tar and all its variations.
I chose to invent the .sar format because it's 20 lines of code to read them,
and about the same to write them. Even doing a survey of the top 10 archive
formats would have taken more time than the entire PR, let alone the time spent
debating them.
The source archive PR is a proof of concept. The actual archive format is
irrelevant.
> or we could indicate they are vendor-specific extensions
Wouldn't that defeat the purpose of being a .tar format?
> It should be a high bar to add new file formats to the toolchain, as this
affects all tools that people depend on and use.
Using a .tar format would affect all the dlang source code tools just as much as
using the .sar format would.
More information about the Digitalmars-d
mailing list