But also new API should just use Double and avoid the problem, which we seem to be doing a terrible job with.
-
-
-
Replying to @CastIrony @stephentyrone and
It's too late for shipping ABIs. "change CGFloat.h so that CGFloat is always double on not-yet-defined platforms" might be a good action to take though
2 replies 0 retweets 1 like -
Replying to @jckarter @stephentyrone and
I mean "SwiftUI should not use CGFloat/CGPoint/CGRect"
1 reply 0 retweets 1 like -
Replying to @CastIrony @stephentyrone and
You can certainly radar that too. It's a tough call, though; you're either impeding interop with Kit APIs, or impeding work with non-kit code
1 reply 0 retweets 1 like -
Replying to @jckarter @CastIrony and
What about something more magical, like CGFloat mapping to Double in Swift overlays, a-la NSUInteger becoming Int?
1 reply 0 retweets 2 likes -
Replying to @nicklockwood @jckarter and
Not source-compatible if we did it now. Doing it in <= Swift 3 might have worked.
2 replies 0 retweets 2 likes -
Replying to @stephentyrone @nicklockwood and
Even then, it's not ABI compatible. How would we map over pointers to buffers full of CGFloat?
1 reply 0 retweets 3 likes -
Replying to @jckarter @nicklockwood and
Magic type that converts to whatever CGFloat "really is" on store. Bring back x87 float-store bugs!
1 reply 0 retweets 1 like -
Replying to @stephentyrone @nicklockwood and
Of course, if we had the magic AnyNumber type and optimizer support for AIR mixed-precision math, none of these type differences would matter to the language ergonomics…
1 reply 0 retweets 2 likes
This is an interesting thread because I use 32-bit floats exclusively in Pathfinder, and I can’t really go to 64-bit without sacrificing compatibility with many GPUs…
-
-
If you don't need to have world-space coordinates that's usually fine. CGFloat gets used in a lot of "world-space-esque" ways though, and it causes problems.
1 reply 0 retweets 3 likes -
Replying to @stephentyrone @pcwalton and
Yeah, arguably a better solution than going to Double seems like it'd be to pair Float with a fixed-point translation
1 reply 0 retweets 0 likes - 4 more replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.