4 ms·
>What gives you the impression that this is the "wrong" way to do this? It's far less maintainable and goes against the grain of how people expect libraries to
by Sir_Cmpwn 8y ago
>What gives you the impression that this is the "wrong" way to do this?
It's far less maintainable and goes against the grain of how people expect libraries to behave.
>How many beginners are going to be looking to μUBSan for guidance on how to structure their generic library?
Any beginner who uses it. You make a good point, though, this isn't exactly a beginner-tier tool so why is it being distributed like one?
>unless you #include it, which would also probably work
I think that's what they're expecting you to do. And if you're linking anyway, what does it matter if it's one object or several? Or more realistically, a single archive (built from many objects which are themselves built from many source files)?
- microcolonel 8y ago> It's far less maintainable... How so? What form of maintenance does it prevent or hurt? > ...and goes against the grain of how people expect libraries to behave. You could dynamically link it if you wanted, it's just that there is little reason to. This approach is inclusive: it enables all three major ways people use libraries. Honestly, I don't see what the problem is. You're entitled to prefer dynamic linking or static linking, but how does it hurt you that it can also be used another way?
- Sir_Cmpwn 8y agoI'm not arguing about dynamic versus static linking. In fact, I think dynamic linking is pretty bad. I'm just arguing against distributing libraries all in one big C file. You can statically link against an archive built from several sources.
- microcolonel 8y agoBut why does it bother you so much? Clearly this is a feature for somebody else, and it's not an issue for you.
- Sir_Cmpwn 8y agoAs I said elsewhere: >I don't consider open source projects a black box, I evaluate every project under the lens of someone who expects to someday have to work with the code myself and send patches upstream. And I think I'm squarely in the target audience for this tool anyway. What makes you think it's a feature for someone else?
- microcolonel 8y ago> What makes you think it's a feature for someone else. The fact that they mention it specifically and proudly on the front page indicates to me that the author, and the NetBSD maintainers who accepted it, consider it good that it is a single, largely self-contained source file. It is only ~1300 source lines, so I don't see why it should necessarily be split out. Something tells me the original authors and the ongoing maintainers of this file have a better idea what value this choice represents than you do (since you haven't said anything particularly compelling in favour of splitting this into several files and objects).