title: Difference between CommandLine.arguments and Processinfo.processinfo.arguments in swift
body: <p>I wanna know how these are different
  <a href="https://developer.apple.com/documentation/swift/commandline" rel="noreferrer">CommandLine</a>
  <a href="https://developer.apple.com/documentation/foundation/processinfo" rel="noreferrer">ProcessInfo</a></p>
  
  <pre><code>let elements = CommandLine.arguments
  let elements = Processinfo.processinfo.arguments
  </code></pre>
  
  <p>In my thinking, ProcessInfo’s arguments have all of the Commandline's concept. So there is no differences for dealing with argument.</p>
  
  <p>The code below, using CommandLine.arguments, is for practicing read and write file.</p>
  
  <p>If I put Processinfo.processinfo.arguments at location of CommanLine.arguments. Nothing changed.</p>
  
  <pre><code>static func makeInOutFile() -&gt; (inputFile: String, outputFile: String)? {
      let elements = CommandLine.arguments
      let inputFile: String
      let outputFile: String
      switch elements.count {
      case 2:
          inputFile = elements[1]
          outputFile = Message.ofDefaultJSONFileName.description
          return (inputFile: inputFile, outputFile: outputFile)
      case 3:
          inputFile = elements[1]
          outputFile = elements[2]
          return (inputFile: inputFile, outputFile: outputFile)
      default:
          print (Message.ofFailedProcessingFile)
          return nil
      }
  }
  </code></pre>