[swift-evolution] Contiguous storage byte arrays

Ted F.A. van Gaalen tedvgiosdev at gmail.com
Wed Feb 17 12:40:00 CST 2016


ok, thank you, didn’t know that.


Ted 
> On 17.02.2016, at 19:34, Dmitri Gribenko <gribozavr at gmail.com> wrote:
> 
> On Wed, Feb 17, 2016 at 6:53 AM, Ted F.A. van Gaalen via
> swift-evolution <swift-evolution at swift.org> wrote:
>> Hello Johan, thanks for your reply.
>> It would be nice if there was some kind of attribute like
>> var bytes: [UInt8] contiguous  = ...      //  to declare a contiguous array.
> 
> Unless you create an Array by bridging from NSArray, Swift's Array is
> guaranteed to have contiguous storage.
> 
> 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>*/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160217/73b7f411/attachment.html>


More information about the swift-evolution mailing list