NSURL, URL and NSData, Data
<p>I'm new to Swift. I was pulling an image from the Internet when I came across <code>NSURL</code> and <code>URL</code> and <code>NSData</code> and <code>Data</code>. I'm really confused. Which ones do I use? I used the following code, but I had to convert the types as shown below. What is the proper way of doing this and what is the difference between <code>NSURL</code> and <code>URL</code> and <code>NSData</code> and <code>Data</code>? Somebody please help.</p>

<pre><code>if let theProfileImageUrl = tweet.user.profileImageURL{
    if let imageData = NSData(contentsOf: theProfileImageUrl as URL){
        profileImageView.image = UIImage(data: imageData as Data)
    }
}
</code></pre>