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
Do you use them a lot outside of a Cocoa/UIKit context?
Félix
> Le 6 janv. 2016 à 00:08:35, John Randolph via swift-evolution
> a écrit :
>
> Sorry if this is a repeat, but I’d like to suggest promoting certain structs
> from Foundation to the Swift standard
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* or *Point* as part of
the standard library.
On Wed, Jan 6, 2016 at 9:32 PM, John Randolph via
> On Jan 5, 2016, at 10:10 PM, Brent Royal-Gordon
> 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
> 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
NSRect and CGRect are already the same type and can be used interchangeably:
> typedef CGRect NSRect;
You can easily typealias CGRect to Rect as well if you don't like the
two-letter prefix. Otherwise, if you can wait a bit, SE-0005