Re: [swift-evolution] Pitch: Improved Swift pointers

2017-07-17 Thread Taylor Swift via swift-evolution
I’ve drafted a new version of the unsafe pointer proposal based on feedback I’ve gotten from this thread. You can read it here . ~~~ Swift’s pointer types are an important interface for low-level memory manipulation, but the curre

Re: [swift-evolution] Pitch: Improved Swift pointers

2017-07-17 Thread Andrew Trick via swift-evolution
> On Jul 14, 2017, at 7:24 PM, Taylor Swift wrote: > > For the sake of argument, I’m gonna claim that instead, > UnsafeMutableBufferPointer is the low level necessity, and > UnsafeMutablePointer is the low level convenience structure. > > Suppose that every block of memory has a starting poin

Re: [swift-evolution] [Review] SE-0182 - String Newline Escaping

2017-07-17 Thread Adrian Zubarev via swift-evolution
I only had a quick glance but I quickly noticed that there were quite a lot cases which didn’t require a trailing new line, but if we’d revert this decision would require a trailing \ over and over. That would make the simplest multi-line string literal not that simple anymore: """ abc """ == "

Re: [swift-evolution] [Pitch] KeyPath based map, flatMap, filter

2017-07-17 Thread Tino Heth via swift-evolution
I hope for Swift meta-programming features evolving alongside reflection (both topics imho still need a complete concept): How about collection.map(MyObject.myProperty.get) or, to avoid possible ambiguity, something like collection.map(.myProperty#get) ? ___

Re: [swift-evolution] [Review] SE-0182 - String Newline Escaping

2017-07-17 Thread David Hart via swift-evolution
To add a data point, I migrated the Swift Package Manager to use Swift 4’s multi-line strings this weekend. Nearly all of the resulting multi-line strings required an ending new-line, forcing me to write the following pattern everywhere: let text = ""” lorem ipsum dolor sit amet consect

Re: [swift-evolution] [Review] SE-0182 - String Newline Escaping

2017-07-17 Thread John Holdsworth via swift-evolution
As this review winds down it seems fair to say the response has been generally favourable with some reservations about whether this should be applied to single line strings as well. I’d include single line strings myself for consistency with multi- line and with other languages myself but that isn

Re: [swift-evolution] [RFC] Definitive Initialization and Incompatibilities with Fixed-size Arrays

2017-07-17 Thread Félix Cloutier via swift-evolution
I think that you're getting ahead of yourself. Fixed-size arrays are still useful even if they have to have been demonstrably initialized before you can use dynamic indices with them. A ton of people have already gotten into the habit of writing `int foo[40] = {}` in C. I would like to encourag

Re: [swift-evolution] [Pitch] KeyPath based map, flatMap, filter

2017-07-17 Thread Elviro Rocca via swift-evolution
Subscripts in Swift in fact have always looked to me like a way to make objects "callable", where you use brackets instead of parentheses: the difference of course is the fact that, when used point-free, the object will be considered an instance and not a function. In this sense we could theore