I don’t know if our discussion is welcome in regard to the original post. So I’m tempted to stop here.
On the other hand I really don’t like it to end a discussion because it got heated or is obviously mostly about misunderstandings or misinterpretations. So if anybody wants me to shut up, just say so.
I did. See above.
I don’t know which question you already answered or which question the following text is answering. The question I meant was why you think my default of linking everything into a single binary is “awful”.
I ask this, because I mentioned a whole lot of reasons why I believe it’s a good default. You did not argue with any of these reasons, neither did you explain why your approach is objectively better.
You did say that this approach proved to be successful, but that is not an argument for which approach is better (by any metrics that you are free to choose, just like I chose my metrics when making my arguments).
Natural as in encapsulating logic in functions, related functions in files and sets of files in modules? Sure. But I do not believe that DLL/SO are a tool that is well suited to organize code. See, I said “I do not believe”, because I might well miss something. This is an invitation for you to tell me that I’m wrong because something.
How am I to understand this:
“Look” - you thought I wasn’t considering and should take a second look.
“there are two X” + “guy is talking about X2” = “You thought it was X1, so look again”
That’s how I read your comment. What should I have understood instead?
I completely disagree with this. It is perfectly possible. You are actually delivering your plugins, just because somebody might possibly use them. And you are doing that together with everything else your project delivers in that single .deb package.
If you have 500 decoders and your users typically only use 3 of them, then it would be idiotic to link the whole bunch into a single executable. But that’s what I meant when I said “in the absence of requirements”, a single executable is a sane default.
And idiotic as it would be to pack all the decoders into a single executable, it might not even have a significant impact. But if you are facing the decision whether to implement it one way or the other, going the DLL way has an immediate impact. It’s more coding work. There are several point of failure. Nothing bad, it’s just additional complexity that - in the absence of conditions changing the picture - is not delivering a counter value (that I can see).
I never said what you do is wrong. You may have good reasons and your solution may well be better than mine in this particular context. But as a general rule of thumb, I believe the simple way is also the better way in the scope of the discussion (and I enumerated the reasons why I think so).
I’m really irritated, because I don’t understand how what I say is offending you.
If you would consider the arguments I presented for why statically linked binaries with all the benefits Zig’s comptime have potential to make run code faster while potentially using less memory, then I’m either wrong and you didn’t tell me, or I’m right and performance, memory size, security and maintenance overhead are irrelevant. But what then is relevant when choosing a delivery format for software?
That’s basically the same question as the one I asked again at the top.
The closest you came to answering this was “It’s natural” and I’m fine with that, if this is why you prefer your solution, because it’s none of my business what you prefer. But that wouldn’t justify you telling me that my approach is “awful”. And here the circle is closing again.
I never said and much less meant that using plugins is unreasonable. I said that using DLLs is unattractive. And the context was: “should zig have it’s own DLL format?”. And the context for that in turn was: “I had to write all my declarations twice - how annoying” (not literal quotes). And it turned out that this was said in the context of defining an interface for device drivers in a kernel that would not use any implementation of shared libraries or DLLs, but a kind of kernel module that had to be specific for that kernel.
I definitely feel justified to say that shared libraries are unattractive (to receive first class Zig support). Unattractive is not unreasonable. It’s just something you would not prefer unless you have a reason to.
But even without the context. I can see how you might disagree with me. But why is that raising the temperature so much?
I really feel a bit bad about the friction of the whole discussion. If I offended you then please know that this was not my intention, but also that I don’t think you needed to feel that way.