Removing AutoDecoding #12
Replies: 2 comments 3 replies
-
Walter has already proposed using One thing I would like to explicitly like to avoid is a proliferation of string-only overloads as it ends up becoming auto-decoding by a different means and is incredibly cumbersome to maintain. |
Beta Was this translation helpful? Give feedback.
-
If I pictured it correctly what's happening, it's closer to your first option. Strings are still defined as ranges of characters, not as a separate type. One difference though: I think an array of characters will still be treated as a character range as-is, meaning you don't need to do that |
Beta Was this translation helpful? Give feedback.
-
I think there's 2 ideas of what "removing auto decoding" will mean, and this will be a debate eventually
either verbose string iterators :
"hello world".byAscii.spilt(' ')
or strings get their own overloads:
Please pick the first one
and then support indexing, and have overloads for all string usecases
There several valid ways to iterate on string:
and then several ways to then use the indexes/data of those strings:
etc.
Strings are probaly the datastucture that has the most ways to iterate it by, so copy the aa's and have byPair, byValue and make some overloads for indexing that works with some c code; dont attempt to put some subset of that logic into a repeat of std.string duplicating logic and probaly failing most uses cases anyway
Beta Was this translation helpful? Give feedback.
All reactions