News for hackers. Stuff that matters.
Re:Hooray for the Sockets Interface by zbentley on Wednesday July 29, 2026 @11:33AM (#49098852)
I'd actually say that the original sin of the socket API was taking DNS in higher-level connect methods at all. Users should have to separate the act of address lookup from the act of opening a connection every time (and could write the 5loc utility function to hide that split if they want).

I say that not out of purity concerns, but because of how DNS and TCP work. DNS multirecord selection (or not) should be up to the user. DNS timeouts should be surfaced granularly and differently from e.g. TCP SYNACK timeouts. Once a TCP stream is open, if a novice user opened it conceptually to a domain rather than an address, there's no intuitively correct answer to what happens if the domain's resolution changes while the socket's connected.

Re:Hooray for the Sockets Interface by inigyou on Wednesday July 29, 2026 @07:06PM (#49104249)
When it was written I don't think they had DNS. Maybe they had hosts files maybe not.