[swift-evolution] [Proposal]: Rectangles and other common structures.

John Randolph jcr at icloud.com
Tue Jan 5 23:10:31 CST 2016


Sorry if this is a repeat, but I’d like to suggest promoting certain structs from Foundation to the Swift standard library.

As an OS X and iOS developer, it sometimes seems that I work with [GG|NS]Point, [GG|NS]Rect, and [GG|NS]Size almost as much as I use Float or String.  I’d love to see Swift’s standard library include Rect, Point, and Size types, with bridging to make them “just work” with any UIKit or AppKit API that expects their NS or CG equivalents.  Maybe also typealias Frame and Bounds to Rect while we’re at it.

Thoughts?

-jcr




More information about the swift-evolution mailing list