[swift-evolution] Expanded support for numeric types in stdlib?

Dmitri Gribenko gribozavr at gmail.com
Sat Dec 5 23:57:05 CST 2015


On Fri, Dec 4, 2015 at 6:13 AM, Vinicius Vendramini
<vinivendra at gmail.com> wrote:
>
> If Swift’s Ints may go up to 2048 bits, I’d agree that they probably cover most cases. That’s not to say a big int would be useless, just that I think it should be separate, meant to be used by those who actually need it rather than interfering with normal Int logic, which is likely to be used more often.

Swift's 'Int's are pointer-sized.  Swift's integer literals can be up
to 2048 bits, which allows one to write types (e.g., BigInt) that can
be initialized from large literals.

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-evolution mailing list