# NSData vs Data in swift 3

**URL:** <https://forums.swift.org/t/nsdata-vs-data-in-swift-3/3758>\
**Category:** Using Swift\
**Created:** [August 12, 2016, 4:00am UTC](https://forums.swift.org/t/nsdata-vs-data-in-swift-3/3758 "2016-08-12T04:00:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cktung](https://avatars.discourse-cdn.com/v4/letter/c/fbc32d/32.png) [@cktung](https://forums.swift.org/u/cktung)\
**Post date:** [August 12, 2016, 4:00am UTC](https://forums.swift.org/t/nsdata-vs-data-in-swift-3/3758/1 "2016-08-12T04:00:45Z")

</div>

Anyone know where to get the updated guide on Binary Data in swift 3?

The only thing I know from WWDC video is that "NSData" is reference type and the "Data" is value type and they have different methods of init rules and to getbytes or copybytes.

Any idea on the motivation to have new Data class in Foundation ?

---

<div class="post-metadata">

**Author:** ![eskimo](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/eskimo/32/13558_2.png) [@eskimo](https://forums.swift.org/u/eskimo)\
**Post date:** [August 12, 2016, 7:50am UTC](https://forums.swift.org/t/nsdata-vs-data-in-swift-3/3758/2 "2016-08-12T07:50:04Z")

</div>

For the motivation behind these changes, check out the following Swift evolution proposals:

\* SE-0069 “Mutability and Foundation Value Types”

\<[https://github.com/apple/swift-evolution/blob/master/proposals/0069-swift-mutability-for-foundation.md&gt](https://github.com/apple/swift-evolution/blob/master/proposals/0069-swift-mutability-for-foundation.md&gt);

\* SE-0086 “Drop NS Prefix in Swift Foundation”

\<[https://github.com/apple/swift-evolution/blob/master/proposals/0086-drop-foundation-ns.md&gt](https://github.com/apple/swift-evolution/blob/master/proposals/0086-drop-foundation-ns.md&gt);

If you have specific questions beyond that please post ’em here and we’ll see what we can do to help.

Share and Enjoy

> **···**
>
> On 12 Aug 2016, at 05:00, CK TUNG via swift-users \<swift-users@swift.org\> wrote:
> 
> > Any idea on the motivation to have new Data class in Foundation ?
> 
> --  
> Quinn "The Eskimo!" \<[http://www.apple.com/developer/&gt](http://www.apple.com/developer/&gt);  
> Apple Developer Relations, Developer Technical Support, Core OS/Hardware
