[swift-users] Range<UInt64>.count can abort
Dmitri Gribenko
gribozavr at gmail.com
Sat Apr 16 14:53:31 CDT 2016
On Sat, Apr 16, 2016 at 8:29 AM, <davesweeris at mac.com> wrote:
> Is there any reason that Distance has to be a simple Int? Since it’s defined
> per-type, UInt64 could use a custom struct without impacting the performance
> of other types:
It needs to be a signed integer. And a signed integer needs a
distance type itself.
Dmitri
--
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
More information about the swift-users
mailing list