No we should not support enum types derived from strings

Jon Degenhardt jond at noreply.com
Sat May 8 18:54:49 UTC 2021


On Saturday, 8 May 2021 at 16:25:31 UTC, Berni44 wrote:
> On Saturday, 8 May 2021 at 16:04:24 UTC, guai wrote:
>> Dividing utf-8 array and searching for the nearest char may 
>> split inside a combining character which isn't a thing you 
>> usually want.
>
> It is not difficult to recognize this case and go back 1 to 3 
> bytes to reach a correct splitting place. UTF-8 was designed 
> with this in mind.
>
> - I can imagine, that this can be useful in divide-and-conquer 
> algorithms, like binary search.
> ... (more examples) ..
> - You want to process pieces of a string in parallel: Cut it in 
> 16 pieces and let your 16 cores work on each of them.

Exactly. All the ideas you listed apply. Parallelization is very 
often useful.


More information about the Digitalmars-d mailing list