The Case Against Autodecode

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Thu Jun 2 06:25:15 PDT 2016


On 6/2/16 9:09 AM, Andrei Alexandrescu wrote:
> On 06/02/2016 09:05 AM, Steven Schveighoffer wrote:
>> On 6/1/16 6:24 PM, Andrei Alexandrescu wrote:
>>> On 06/01/2016 06:09 PM, ZombineDev wrote:
>>
>>>> Deprecating front, popFront and empty for narrow
>>>> strings is what we are talking about here.
>>>
>>> That will not happen. Walter and I consider the cost excessive and the
>>> benefit too small.
>>
>> If this doesn't happen, then all this push to change anything in Phobos
>> is completely wasted effort.
>
> Really? "Anything"?

The push to make Phobos only use byDchar (or any other band-aid fixes 
for this issue) is what I meant by anything. not "anything" anything :)

>> As long as arrays aren't treated like
>> arrays, we will have to deal with auto-decoding.
>>
>> You can change string literals to be something other than arrays, and
>> then we have a path forward. But as long as char[] is not an array, we
>> have lost the battle of sanity.
>
> Yeah, it's a miracle the language stays glued eh.

I mean as far as narrow strings are concerned. To have the language tell 
me, yes, char[] is an array with a .length member, but hasLength is 
false? What, str[4] works, but isRandomAccessRange is false?

Maybe it's more Orwellian than insane: Phobos is saying 2 + 2 = 5 ;)

> Your post is a prime example that this thread has lost the battle of
> sanity. I'll destroy you in person tonight.

It's the cynicism of talking/debating about this for years and years and 
not seeing any progress. We can discuss of course, and see who gets 
destroyed :)

And yes, I'm about to kill this thread from my newsreader, since it's 
wasting too much of my time...

-Steve


More information about the Digitalmars-d mailing list