I disagree with this. Separating lookup from connect(2) or sendmsg(2) is cleaner. If an application doesn't care about the difference, most people are using higher level APIs built on top anyway, and most of those will provide a quick way to hide DNS details from you.
https://blog.ipspace.net/2009/08/what-went-wrong-socket-api/
A DNS name can have a LOT of A records associated but a socket has to pick one. This is a severe limitation.