Re: [swift-evolution] Inefficiency in recursive value types

2017-03-13 Thread Dimitri Racordon via swift-evolution
More of a swift-dev topic. CC'ing there, BCC'ing evolution. Thanks! I’ll track the issue over there. I do have to note that this is a very strange of writing Nat. Why recurse through a protocol type instead of recursing concretely? My examples are extracted from a more complex codebase that

Re: [swift-evolution] Inefficiency in recursive value types

2017-03-13 Thread John McCall via swift-evolution
> On Mar 13, 2017, at 8:55 AM, Dimitri Racordon via swift-evolution > wrote: > Hello fellow evolutionists, > > I’m not sure this list is the best place to talk about this, so please > redirect me if it should be discussed elsewhere. More of a swift-dev topic.

Re: [swift-evolution] Inefficiency in recursive value types

2017-03-13 Thread Jean-Daniel via swift-evolution
If you want to understand the performance implication of using protocol for value type, you should watch this session. https://developer.apple.com/videos/play/wwdc2016/416/ It is very instructive. > Le 13 mars 2017 à 13:55, Dimitri

[swift-evolution] Inefficiency in recursive value types

2017-03-13 Thread Dimitri Racordon via swift-evolution
Hello fellow evolutionists, I’m not sure this list is the best place to talk about this, so please redirect me if it should be discussed elsewhere. While trying to implement algebraic data types in Swift, I stumble upon an interesting problem. Let’s consider the following example: protocol