Hot take incoming…
All I want from Swift is a fast compiler that gives actually useful error messages. Enough syntax sugar. Oh and also, Swift Concurrency has been a disaster.
Hot take incoming…
All I want from Swift is a fast compiler that gives actually useful error messages. Enough syntax sugar. Oh and also, Swift Concurrency has been a disaster.
@ryanashcraft The syntax sugar we got: `unchecked @Sendable`
The syntax sugar we wanted: `"0123456789abcdef"[x & 0x0f]` (aka int based subscript for strings)
@hannesmnagel The performance hit is not a good reason. If I need the 4rd character of a string, I will access it:
`"Hello".dropFirst(3).first!` is by no means faster.
The same for `"Hello".unicodeScalars[3]`,
or `"Hello".prefix(4).suffix(1)`,
or `let temp = "Hello"; temp[temp.indices[3]]`,
or `let temp = "Hello"; temp[temp.index(temp.startIndex, offsetBy: 3)]`.
The reason that the subscript in `Collection` is documented to be O(1) is weak, too: subscript[Index] has to be O(1), but Index!=int.