Re: [swift-evolution] [Pitch] Set of AnyObject by reference

2016-07-17 Thread via swift-evolution
> 在 2016年7月18日,02:08,Dmitri Gribenko 写道: > > On Sun, Jul 17, 2016 at 2:00 AM, 张国晔 via swift-evolution > wrote: >> I'm building an document-based app, and I'm having a problem regarding to >> Set. >> >> What I hope to achieve is to have a

Re: [swift-evolution] [Pitch] Set of AnyObject by reference

2016-07-17 Thread via swift-evolution
> 在 2016年7月17日,17:44,Tino Heth <2...@gmx.de> 写道: > > >> What I hope to achieve is to have a Set of unique objects by their >> references. For example, I might put in two rectangles with the same height >> and width (which makes them equal, but they are still different instances). > I guess th

[swift-evolution] [Pitch] Set of AnyObject by reference

2016-07-17 Thread via swift-evolution
I'm building an document-based app, and I'm having a problem regarding to Set. What I hope to achieve is to have a Set of unique objects by their references. For example, I might put in two rectangles with the same height and width (which makes them equal, but they are still different instances)

[swift-evolution] Specialization of functions with default parameters or discardable result

2016-04-26 Thread via swift-evolution
Functions in Swift can have default parameters or discardable result, but without inlining, calling them could be suboptimal in performance. I propose a solution which compiler generates specializations of those functions, hence more optimization can be performed for specific usage. This can al