How do you know when to cast an item in swift?
<p>I see it done all the time but don't know how other coders know when to cast an item. Here is an example that recently had me wondering how the coder knew to cast the item:</p>

<pre><code>let item = NSEntityDescription.insertNewObjectForEntityForName("Item", inManagedObjectContext: ad.managedObjectContext) as! Item
</code></pre>