title: How can I tell what the class of an instance variable is in Swift
body: <p>Is there any easy way to tell what <code>class</code> an instance variable is in a Swift?  In the JVM-based languages that I'm used to, you can do something like <code>println(value.class)</code> to get it's class.</p>
  
  <p>Is there something equivalent in Swift?  </p>
  
  <p>The closest thing I can find in the docs is the ability to do "type checking" with the <a href="https://developer.apple.com/library/prerelease/ios/documentation/swift/conceptual/swift_programming_language/TypeCasting.html" rel="nofollow noreferrer"><code>is &lt;Class&gt;</code> keyword</a> but that only helps me guess a little bit.</p>
  
  <p>I've run into a <a href="https://stackoverflow.com/questions/24100707/compile-error-with-let-in-swift-switch-statements">few situations</a> in playing around where I thought I had one type of class, but actually had another and didn't know how to know for sure.</p>