I support this, not because I find NS- and CG- geometric structs confusing. I support it because I'm hoping Swift library versions would be generic. I would be very glad to see us get *Rect<Double>* or *Point<Int>* as part of the standard library.
On Wed, Jan 6, 2016 at 9:32 PM, John Randolph via swift-evolution < [email protected]> wrote: > > > On Jan 5, 2016, at 10:10 PM, Brent Royal-Gordon <[email protected]> > wrote: > > > >> 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? > > > > My main thought is that, although I use these types in my iOS and Mac > apps all the time, I think I've used a rectangle type in web development > maybe once (when I was generating images). Swift is currently used mainly > for GUI programming, but most of the domains it's expanding into are ones > where it doesn't need those types. > > It’s a feature that would be useful in the areas where Swift is being used > today. Whether a feature is important in other domains doesn’t make it any > less useful in Swift’s current applications. > > -jcr > _______________________________________________ > swift-evolution mailing list > [email protected] > https://lists.swift.org/mailman/listinfo/swift-evolution >
_______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
