Unofficial Hacker News companion — get notified on comment replies, and more.

All software sucks (2007) (opens external site)

169 points by archargelod 9 hours ago harmful.cat-v.org 199 comments (opens Hacker News) Vote (opens Hacker News)

View full thread · View on Hacker News

Comment thread (2)

  1. It's all about where you draw the layer boundaries, isn't it? On Windows you don't even get to customise the program loader, because why would you need to. If you use an alternative libc (which is normal on Windows - there is no single unified libc - not even the one called UCRT) you still have the same dynamic loading interface and can load modules compiled with different libcs or no libc.

    The most annoying tradeoff with that is you can't pass libc pointers across DLL boundaries. You can't malloc something in one DLL and free it in another. You either use an allocator from a known DLL (like LocalAlloc/LocalFree) or you give your DLL a wrapper call to free so you can free the things it returns.

    Replies (1)
    1. Yes, all about how the shape of a layer boundary affects other social and technical areas. A shared library takes the shape of a C language implementation, while an RPC protocol over sockets takes the shape of the kernel interface. Because important system components change between systems, and those components only provide a C interface (instead of a language-neutral interface), the necessity of dynamic linking forces the supremacy of a particular C implementation (glibc ld.so). Other C implementations and other programming languages must accommodate, or else suffer incompatibility.

      You shared a great example. A unified program loader allows multiple libc implementations. However, no single unified libc means no passing libc pointers across DLLs.