Re: [swift-evolution] [Draft] Rename Sequence.elementsEqual

2017-10-18 Thread Ole Begemann via swift-evolution
On Tue, Oct 17, 2017, at 20:46, Xiaodi Wu via swift-evolution wrote: > On Tue, Oct 17, 2017 at 12:54 Jonathan Hull wrote: > >> Why was elementsEqual created? Isn’t it meant to check equality of >> two sequences in a generic context where == isn’t available?> > No no no no no no no no. That’s pr

Re: [swift-evolution] [Draft] Rename Sequence.elementsEqual

2017-10-14 Thread Ole Begemann via swift-evolution
> One rationale I heard (I think from Ben Cohen) for why 'first' is not defined > on Collection is that Sequences can be single-pass, and it would feel weird > for a seemingly innocuous property like 'first' to have side effects. This should be "not defined on Sequence", of course. Apologies for

Re: [swift-evolution] [Draft] Rename Sequence.elementsEqual

2017-10-14 Thread Ole Begemann via swift-evolution
> On 14. Oct 2017, at 21:55, Xiaodi Wu via swift-evolution > wrote: > > On Sat, Oct 14, 2017 at 14:36 Benjamin G > wrote: > I think what you're saying and what Kevin is saying are in way not > contradictory : > > You're saying the "SpongeBob" protocol fu

Re: [swift-evolution] SE-1084 (B): buffer pointer partial initialization API

2017-10-12 Thread Ole Begemann via swift-evolution
> On 12. Oct 2017, at 01:17, Kelvin Ma via swift-evolution > wrote: > > On Wed, Oct 11, 2017 at 6:06 PM, Nevin Brackett-Rozinsky > mailto:nevin.brackettrozin...@gmail.com>> > wrote: > On Wednesday, October 11, 2017, Kelvin Ma via swift-evolution > mailto:swift-evolution@swift.org>> wrote: >

Re: [swift-evolution] Pitch: Cross-module inlining and specialization

2017-10-04 Thread Ole Begemann via swift-evolution
How does @inlinable relate to the @_specialize attribute described in https://github.com/apple/swift/pull/6797 (original swift-evolution post about it: https://lists.swift.org/pipermail/swift-dev/Week-of-Mon-20160314/001449.html)? Here's how I understand it: @_specialize emits the specialized

[swift-evolution] Playground with new Swift 4 features

2017-05-19 Thread Ole Begemann via swift-evolution
Hello, if you'd like to try out some of the new features coming in Swift 4, I made a playground to do just that. I thought I'd tell the list about it because some of you may find it useful. You can download the playground on GitHub: https://github.com/ole/whats-new-in-swift-4 The playgroun

Re: [swift-evolution] [Pitch] New collection-based 'repeat' API

2017-05-02 Thread Ole Begemann via swift-evolution
On 02.05.2017 18:33, Ole Begemann via swift-evolution wrote: For reference, here are some links to previous discussions on related topics: 1) Kevin Ballard in December 2015: Proposal: CollectionType.cycle property for an infinite sequence <https://lists.swift.org/pipermail/swift-evolut

Re: [swift-evolution] [Pitch] New collection-based 'repeat' API

2017-05-02 Thread Ole Begemann via swift-evolution
For reference, here are some links to previous discussions on related topics: 1) Kevin Ballard in December 2015: Proposal: CollectionType.cycle property for an infinite sequence 2) Ben Cohen in February 2016

Re: [swift-evolution] Sequence/Collection Enhancements

2017-02-20 Thread Ole Begemann via swift-evolution
> On 17 Feb 2017, at 01:39, Ben Cohen via swift-evolution > wrote: > > Hi swift-evolution, > > Following up on Ted’s post regarding the opening up of stage 2, I’m starting > a thread to discuss additive algorithms for Sequence and Collection. > > Here is a list of commonly requested algorith

Re: [swift-evolution] Dictionary Enhancements

2017-02-19 Thread Ole Begemann via swift-evolution
> On 17 Feb 2017, at 01:26, Ben Cohen via swift-evolution > wrote: > > Here is a list of commonly requested changes/enhancements to Dictionary, all > of which would probably be appropriate to put together into a single > evolution proposal: > > init from/merge in a Sequence of Key/Value pair

Re: [swift-evolution] Removing enumerated?

2017-02-17 Thread Ole Begemann via swift-evolution
> On 17 Feb 2017, at 16:53, Vladimir.S via swift-evolution > wrote: > > Btw, in context of discussion of indices, > should this be fixed soon: > > func function(c: C) { > for index in c.indices { >print(c[index]) > } > } > ERROR: cannot subscript a value of type 'C' with an index of type

Re: [swift-evolution] Swift 4: Support for static libs / modular development.

2017-02-17 Thread Ole Begemann via swift-evolution
> On 17 Feb 2017, at 10:28, Raphael Sebbe via swift-evolution > wrote: > > I'm not fully aware of the state of discussion, so sorry if it is already > being addressed. I wanted to bring some feedback and awareness about the need > of a supported way to build app components as *static librarie

Re: [swift-evolution] Removing enumerated?

2017-01-31 Thread Ole Begemann via swift-evolution
On 31/01/2017 16:19, Ole Begemann via swift-evolution wrote: Here are three previous discussion about this topic: 1) December 2015: [Idea] Add an (Index,Element) sequence to CollectionType https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151221/004561.html and https

Re: [swift-evolution] Removing enumerated?

2017-01-31 Thread Ole Begemann via swift-evolution
On 31/01/2017 15:24, Chris Eidhof via swift-evolution wrote: There are a couple of things that keep coming up, and a couple of mistakes that I see people making over and over again. One of them is that in almost every workshop, there's someone who thinks that `enumerated()` returns a list of (ind

Re: [swift-evolution] [Discussion] mailing list alternative

2017-01-23 Thread Ole Begemann via swift-evolution
Obligatory prior discussion sheds, er, I mean threads: https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151207/001537.html https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160725/025692.html / https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160801/th

Re: [swift-evolution] Strings in Swift 4

2017-01-20 Thread Ole Begemann via swift-evolution
> The downside of having two types is the inconvenience of sometimes having > a > `Substring` when you need a `String`, and vice-versa. It is likely this > would > be a significantly bigger problem than with `Array` and `ArraySlice`, as > slicing of `String` is such a common operation. It is especi

Re: [swift-evolution] Strings in Swift 4

2017-01-20 Thread Ole Begemann via swift-evolution
extension Unicode { // An example of the option language in declaration context, // with nil defaults indicating unspecified, so defaults can be // driven by the presence/absence of a specific Locale func frobnicated( case caseSensitivity: StringSensitivity? = nil, diacritic diacriticSen

Re: [swift-evolution] stored properties in extensions

2016-10-11 Thread Ole Begemann via swift-evolution
> I think the language devs must have some idea how this will work, but > don't seem to want to share/discuss it at the moment. I was hoping for > some feedback about my implementation ideas - whether they are along the > right lines, or way off, or not necessary (because the implementation > stra

[swift-evolution] NSString.contains(_:) returns false for empty string argument

2016-09-05 Thread Ole Begemann via swift-evolution
Six weeks ago there was a discussion [1] (and a subsequent fix [2]) about the behavior of `String.hasPrefix(_:)` and `String.hasSuffix(_:)` with empty string arguments. After the fix, `str.hasPrefix("")` always returns `true`. This leads to inconsistent behavior with the `NSString.contains(_:)`