There were changes in the general translation mechanism, or
there is a “custom translation” for this particular API.
My guess would be the custom translation, but I could not find any occurrence of "printView" in the Swift source code. Also there is no NS_SWIFT_NAME annotation on the Objective-C declaration in NSView.h.
I also could not find anything related to this change in the Swift CHANGELOG or the Xcode 9 release notes, but of course I may have overlooked something.
Any insights on how/where this translation works, and what made it change between Swift 3 and Swift 4 are welcome.
I believe the mapping in this case is defined by the associated .apinotes file for the AppKit framework. From the linked read-me:
API notes provide a mechanism by which Objective-C APIs can be annotated with additional semantic information not present within the original Objective-C headers. This semantic information can then be used by the Swift compiler when importing the corresponding Objective-C module to provide a better mapping of Objective-C APIs into Swift.
The apinotes for AppKit can be found at the following path:
NSWindow, NSView, NSDocument’s print() instance methods have been renamed to printWindow(), printView(), and printDocument() respectively in Swift 4. This fixes the unexpected experience where adding debug logging to a subclass of one of these instances shows a print panel instead.