title: What is the difference between Local and External Parameter Names in Swift
body: <p><a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Initialization.html#//apple_ref/doc/uid/TP40014097-CH18-ID203" rel="noreferrer">https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Initialization.html#//apple_ref/doc/uid/TP40014097-CH18-ID203</a></p>
  
  <pre><code>struct Celsius {
      var temperatureInCelsius: Double
      init(fromFahrenheit fahrenheit: Double) {
          temperatureInCelsius = (fahrenheit - 32.0) / 1.8
      }
      init(fromKelvin kelvin: Double) {
          temperatureInCelsius = kelvin - 273.15
      }
  }
  
  
  let boilingPointOfWater = Celsius(fromFahrenheit: 212.0)
  // boilingPointOfWater.temperatureInCelsius is 100.0
  let freezingPointOfWater = Celsius(fromKelvin: 273.15)
  // freezingPointOfWater.temperatureInCelsius is 0.0
  </code></pre>
  
  <p>I'm confused why the init functions have (fromFahrenheit fahrenheit: Double) and (fromFahrenheit fahrenheit: Double). The docs say: </p>
  
  <blockquote>
    <p>"The first initializer has a single initialization parameter with an external name of from Fahrenheit and a local name of fahrenheit. The second initializer has a single initialization parameter with an external name of from Kelvin and a local name of kelvin." </p>
  </blockquote>
  
  <p>Why do we need so many names?</p>