Clean Coding in Swift – Type Inference

1 · Andrew Bancroft · Aug. 13, 2014, 4:22 a.m.
Quick! Tell me! What is the Type of the birdDetailsconstant in this code example: 1let birdDetails = birdDetailsFromStorage() With no additional context to glean information from, the correct answer to the question is, “I have absolutely no clue…” Or is it? “Not fair!”, you say. ”In the real world, I’d have the ability to option-click and learn the type from a pop-up tooltip, or learn this information by inspection from Xcode’s utilities panel....