Hi,
Joe Watkins wrote:
> Afternoon Andrea,
>
> A case can be made that the binary cast might at some point do
> something: "(binary) $ustring"
>
> There is no case whatever for the literal b prefix, it will *never*
> have a function if we are not changing the default string representation.
>
> If we do adopt a literal prefix for unicode strings, it's going to be
> rather confusing to learn that u"" does something and b"" is also
> supported, but b"" doesn't, and has never done anything.
Well, that's not quite fair. b"" and "" are equivalent, u"" wouldn't be.
It's only as useless as, say, the unary + operator. I can imagine it
being used to be explicit about using a binary string.
In any case, I don't think that it not doing anything that a bare string
literal does makes enough of a case to remove it. It's going to bite
some people if we remove this, and for what gain?
>
> OP: I think this should be split into two RFC's and voted on
> separately, it certainly can't be merged by anyone as a PR.
The two are related, if we're to get rid of one, we should get rid of
both. If there's BC concerns for (binary), I suspect there's also
breakage for b"". (binary) is also “useless”, insofar as you could just
use (string).
Thanks.
--
Andrea Faulds
https://ajf.me/