3 ms·
The Glibc code shown is really unforgiving, so I don't mind the author's humor. My opinion is that there is only one excuse for writing so unreadable code for
by jerome-jh 6y ago
The Glibc code shown is really unforgiving, so I don't mind the author's humor.
My opinion is that there is only one excuse for writing so unreadable code for such simple functionality (even taking account the legacy): that would be to use a language completely unfit for the task. That should not be the case here ... or is it? Why so many macros?
- rwmj 6y agoglibc is and quite probably has to be written in C (the clue is in the name), and it has to work on a great many platforms and architectures, serving an absolutely huge amount of software. Is there any other software linked with and providing vital infrastructure to tens of thousands of other programs? (Maybe Windows MSVCRT.) I've written tons and tons of software for Linux, and I believe only once have I seen a bug in glibc[1]. [1] And it was both a horrible bug, and also an extremely weird corner case: https://bugzilla.redhat.com/show_bug.cgi?id=563103#c8 https://bugzilla.redhat.com/show_bug.cgi?id=563103#c8