> IPv4 loopback addresses are defined in Section 2.1 of [RFC5735] as "127.0.0.0/8".
Did you just assume IPv4? That's IPist!
Seriously though. IPv6 exists. And it has a different address and notation for localhost (::1). Which means that using an IP(v4)-address alone is not guaranteed to be bulletproof.
The only bulletproof way to ensure that you bind to a genuine loopback interface is letting the OS tell you which address that is. And for that you need a "localhost" hosts-file entry or equivalent.