[swift-users] the pain of strings

Taylor Swift kelvin13ma at gmail.com
Sat Jul 1 00:51:57 CDT 2017

I agree, and the new format of the swift 4 API docs are much harder to find
things in than the swift 3 ones. Perusing all the types and free functions
in alphabetical order is so much easier than trying to guess what “topic”
something is sorted under.

On Sat, Jul 1, 2017 at 12:54 AM, David Baraff <davidbaraff at gmail.com> wrote:

> On Jun 30, 2017, at 9:48 PM, Taylor Swift via swift-users <
> swift-users at swift.org> wrote:
> Swift's strings were very deliberately designed this way. It's tougher to
>> get off the ground, sure, but it's better in the long run.
> It probably is, but the correct idiom is not very well known, and sadly
> most tutorials and unofficial guides are still teaching dumb ways of
> subscripting into strings (or worse, falling back into NSString methods
> without mentioning so) so the end result is people writing less performant
> code rather than more performant code.
> An efficient solution doesn’t help if even experienced programmers can’t
> easily arrive at it.  (I’m highly experienced, but I’ll admit I only put in
> about 5 minutes before I posted that.  on the other hand, it shouldn’t take
> 5 minutes to figure out something that simple with strings.  still, maybe i
> would have done the simple “suffix()” thing had i been looking at the
> actual swift 4 api’s, but i only had swift 3 api’s in front of me.)
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170701/f88a3d68/attachment.html>

More information about the swift-users mailing list