[swift-users] A protocol-oriented numerics library

2017-06-09 Thread Xiaodi Wu via swift-users
Hi all, A few weeks ago, Joe Groff challenged users on Twitter to create a Rational type making use of the new integer protocols implemented for Swift 4. As it happens, I'd already started a project to try out these new number protocols. Now that I think the most embarrassing bugs have been squash

Re: [swift-users] A protocol-oriented numerics library

2017-06-10 Thread Xiaodi Wu via swift-users
That’s a very neat helper! On Sat, Jun 10, 2017 at 10:12 Karl Wagner wrote: > On 10. Jun 2017, at 03:18, Xiaodi Wu via swift-users < > swift-users@swift.org> wrote: > > Hi all, > > A few weeks ago, Joe Groff challenged users on Twitter to create a > Rational type ma

Re: [swift-users] [swift-evolution] Request for information about constrained protocol inheritance

2017-07-04 Thread Xiaodi Wu via swift-users
Replying to swift-users as well, as it's probably the more appropriate forum. SE-0142 (Permit where clauses to constrain associated types) is what brought about this feature. It is now used in the standard library. On Wed, Jul 5, 2017 at 00:26 Jens Persson via swift-evolution < swift-evolut...@s

Re: [swift-users] Looping through all values between UInt8.min and UInt8.max

2016-04-11 Thread Xiaodi Wu via swift-users
Ouch. Yes, the upper bound can't be required to have a successor. On Fri, Apr 8, 2016 at 3:45 PM Erica Sadun wrote: > It's a really good corner case to consider if you're thinking about > redesigning ranges though. -- E > > > On Apr 8, 2016, at 8:43 AM, Nate Cook wrote: > > > > You can stride th