Dicebot on leaving D: It is anarchy driven development in all its glory.

RhyS sale at rhysoft.com
Thu Sep 6 21:30:21 UTC 2018


On Thursday, 6 September 2018 at 17:19:01 UTC, Joakim wrote:
> No, Swift counts grapheme clusters by default, so it gives 1. I 
> suggest you read the linked Swift chapter above. I think it's 
> the wrong choice for performance, but they chose to emphasize 
> intuitiveness for the common case.

I like to point out that Swift spend a lot of time reworking how 
string are handled.

If my memory serves me well, they have reworked strings from 
version 2 to 3 and finalized it in version 4.

> Swift 4 includes a faster, easier to use String implementation 
> that retains Unicode correctness and adds support for creating, 
> using and managing substrings.

That took them somewhere along the line of two years to get 
string handling to a acceptable and predictable state. And it 
annoyed the Swift user base greatly but a lot of changes got made 
to reaching a stable API.

Being honest, i personally find Swift a more easy languages 
despite it lacking IDE support on several platforms and no 
official Windows compiler.


More information about the Digitalmars-d mailing list