Yes, I’m constantly giving advice to Ruby and JS developers that “URLs are not strings” and to use URI libraries for manipulation. This is also true for phone numbers, emails, IPs, etc.
Hell, even Rails maintainers rejected a PR I opened that tried to get rails link helpers to work with URI objects.
Hell, even Rails maintainers rejected a PR I opened that tried to get rails link helpers to work with URI objects.