4 ms·
Only when things become ambiguous semantically. E.g. if they had `toUri` and `asUri` and `parseUri` etc then sure. But even then it's far more discoverable /
by Groxx 9y ago
Only when things become ambiguous semantically. E.g. if they had `toUri` and `asUri` and `parseUri` etc then sure.
But even then it's far more discoverable / less overwhelming than "I have a String. I want a Uri. Do I use a UriBuilder, UriParser, Uri, StringConverterFactory, etc?". Not only do you have all classes to choose from, you need to pick the one with the right methods (usually not visible when choosing the class) for the data you have.
Some IDEs can and do improve the helper-classes case a bit by letting you type e.g. `myString.uri` and showing you "uri" methods both on string and static methods anywhere which accept strings... but it's not widespread, sometimes unhelpful (there are far too many "parse" methods), and you're still missing out on the class context which sometimes has important info.