Closed ZevEisenberg closed 6 years ago
@jvisenti I pushed an additional commit. Could you please have a look at it? I'm wondering whether it's confusing to have ["a", "b"].joined()
be able to produce either a String
or an NSAttributedString
depending on type inference. cc @KingOfBrian
Good call on the oddity of having the overloads available, but I think it's fine. It may have an impact on compile times, but I doubt it's significant. It could be surprising to a user, but I'm not sure it's a big gotcha. I wonder if there's any guidance on providing overloaded methods.
I think in general the context will define the type and there won't be much ambiguity
I also confirmed that, without any other context, ["a", "b"].joined()
returns a String
, so we should be OK.
Closes #328