News for hackers. Stuff that matters.
Re:Leaky Abstractions by lmm on Wednesday June 02, 2021 @10:27PM (#27376577)
IMO that article is the most damaging thing to happen to programming culture in 20 years. It's not hard to write a valid abstraction, and none of Joel's examples actually hold up (yet he generalises it to a supposedly universal law). Of course abstractions are garbage-in, garbage-out - yes, TCP won't give you a reliable connection if you unplug the network cable, but an application written to use UDP won't fare any better in that case.
Re:Leaky Abstractions by klodolph on Thursday June 03, 2021 @02:02AM (#27377710)
TCP won’t give you a reliable connection if you tunnel TCP over TCP, paradoxically, but you can tunnel TCP over UDP, UDP over TCP, or UDP over UDP. Leaky!
Re:Leaky Abstractions by lmm on Thursday June 03, 2021 @03:07AM (#27378056)
Not "leaky", the conditions that a TCP connection needs its underlying transport to satisfy are explicitly documented, and TCP doesn't conform to them.
Re:Leaky Abstractions by klodolph on Thursday June 03, 2021 @10:58AM (#27382339)
If you're going into the details of what conditions a TCP connection needs, you're no longer talking about an abstraction.
Re:Leaky Abstractions by lmm on Thursday June 03, 2021 @03:52PM (#27386433)
An abstraction doesn't mean you can close your eyes and everything will work by magic. They're extremely useful tools, but like I said: garbage in, garbage out.
Re:Leaky Abstractions by klodolph on Thursday June 03, 2021 @08:16PM (#27389018)
> An abstraction doesn't mean you can close your eyes and everything will work by magic.

Right... that's why they're called "leaky abstractions". Because when you don't pay attention to the implementation details and their constraints, things break.

If it weren't leaky, you'd call it a "specification" instead of an "abstraction".

Re:Leaky Abstractions by lmm on Thursday June 03, 2021 @10:37PM (#27389933)
Requirements are not the same thing as implementation details. 2 + 2 = 4 is a sound abstraction, the fact that 1 + 2 doesn't = 4 doesn't make it "leaky".
Re:Leaky Abstractions by klodolph on Friday June 04, 2021 @02:18AM (#27391114)
2 + 2 = 4 isn't an abstraction. I think we just have a different idea of what an "abstraction" is, which is fine.
Re:Leaky Abstractions by tacitusarc on Thursday June 03, 2021 @12:56AM (#27377376)
It sounds like you completely missed the point he’s trying to make...
Re:Leaky Abstractions by lmm on Thursday June 03, 2021 @03:06AM (#27378048)
Maybe, but if so so did many of my colleagues over the last ten years. I've seen so much bad code written in the name of avoiding abstractions, with that article as direct inspiration.