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

2017-10-03 Thread Jonas B via swift-evolution
> On 4 Oct 2017, at 14:33, Slava Pestov wrote: > > @_versioned makes a symbol visible externally without making it visible from > the language. There is no requirement that a @_versioned thing is @inlinable. > It is used when you want to reference an internal function from an inlinable > func

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

2017-10-03 Thread Jonas B via swift-evolution
> On 4 Oct 2017, at 13:36, Slava Pestov wrote: > >> On Oct 3, 2017, at 9:14 PM, Jonas B via swift-evolution >> mailto:swift-evolution@swift.org>> wrote: >> >> >> Now I understand that this use-case is deferred for a later separate >> discus

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

2017-10-03 Thread Jonas B via swift-evolution
> > Yeah, but the compiler could handle NSObject as a special case. Are there > enough other special cases that it is worth documenting and exposing a > fragile attribute on classes to the user? > Pitching in here.. currently if you do something remotely complex with protocols and generics y

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

2017-10-03 Thread Jonas B via swift-evolution
I find the following points in the proposal interesting: > Within the scope of a single module, the Swift compiler performs very > aggressive optimization, including full and partial specialization of generic > functions, inlining, and various forms of interprocedural analysis. > On the other ha