(In reply to Andrej Mitrovic from comment #1)
> https://github.com/D-Programming-Language/phobos/pull/1665
>
> I don't know why Walter was so hanged up about this. It's a simple function.
> I think it's worth reopening and maybe casting a vote in the forums.
I've been meaning to reply to this for a while, but you know how it is...
Anywhoo, one of the issues that stopped me from re-opening it, was defining a useful interface: Returning "simply" a bool is fine and all, but chances are that when the function returns "false", as user wants to know "Ok, there's non-ASCII characters in here. Where are they?". So without making the function more complicated, there are chances it could return more information than "just" yes/no.
I'd have suggested that isASCII return a slice that starts at (or roughly before) the first non-ASCII character in the string. This would be useful for input with "little to no unicode". The *issue* with this is that is would "flip" isASCII's return code, "thanks" to implicit slice to bool conversion >:(
Or maybe I'm just over-engineering. What's for sure, I don't want to introduce more than 1 function for this...
Comment #3 by bearophile_hugs — 2014-06-13T17:47:31Z
(In reply to monarchdodra from comment #2)
> The *issue* with this is that is
> would "flip" isASCII's return code, "thanks" to implicit slice to bool
> conversion >:(
I suggest to kill the implicit array->bool cast.
Comment #4 by jack — 2016-04-05T00:58:23Z
*** Issue 13020 has been marked as a duplicate of this issue. ***