Re: [swift-users] String initializers and developer ergonomics

2016-05-09 Thread Chris Lattner via swift-users
On May 9, 2016, at 10:25 AM, Joe Groff via swift-users wrote: >> This seems like a tricky gotcha for developers who aren't extremely familiar >> with both the String and reflection APIs. His code looked reasonable at a >> first glance and I didn't suspect anything was

Re: [swift-users] String initializers and developer ergonomics

2016-05-09 Thread Daniel Dunbar via swift-users
> On May 9, 2016, at 10:28 AM, Jacob Bandes-Storch via swift-users > wrote: > > On Mon, May 9, 2016 at 10:25 AM, Joe Groff via swift-users > > wrote: > > > On May 7, 2016, at 10:39 AM, Austin Zheng via swift-users >

Re: [swift-users] String initializers and developer ergonomics

2016-05-09 Thread Jacob Bandes-Storch via swift-users
On Mon, May 9, 2016 at 10:25 AM, Joe Groff via swift-users < swift-users@swift.org> wrote: > > > On May 7, 2016, at 10:39 AM, Austin Zheng via swift-users < > swift-users@swift.org> wrote: > > > > Hello Swift users, > > > > I wanted to run something past you folks and get some opinions/feedback.

Re: [swift-users] String initializers and developer ergonomics

2016-05-09 Thread Zach Waldowski via swift-users
On Mon, May 9, 2016, at 01:25 PM, Joe Groff via swift-users wrote: > This definitely strikes me as a problem. The String(_:) constructor is > very easy to call by accident if you're trying to hit another unlabeled > initializer. It also strikes me as not particularly "value-preserving", > since

Re: [swift-users] String initializers and developer ergonomics

2016-05-09 Thread Joe Groff via swift-users
> On May 7, 2016, at 10:39 AM, Austin Zheng via swift-users > wrote: > > Hello Swift users, > > I wanted to run something past you folks and get some opinions/feedback. > > About a month ago on Hacker News I saw someone commenting about how Swift's > string-handling

Re: [swift-users] String initializers and developer ergonomics

2016-05-07 Thread Dennis Weissmann via swift-users
Hi Austin, I further “swiftyfied” the code to this (swift-DEVELOPMENT-SNAPSHOT-2016-05-03-a): import Foundation let N = 1_000_000 func generateTestData() -> [String] { return (0..

[swift-users] String initializers and developer ergonomics

2016-05-07 Thread Austin Zheng via swift-users
Hello Swift users, I wanted to run something past you folks and get some opinions/feedback. About a month ago on Hacker News I saw someone commenting about how Swift's string-handling code was unbearably slow (3 seconds to run a code sample, vs. 0.8 in Java). I asked him to provide the code,