3 ms·
All I'm saying is the same binary is acting as the interpreter and REPL for swift and Python, this is different to other languages. A good example is Ruby which
by schappim 11y ago
All I'm saying is the same binary is acting as the interpreter and REPL for swift and Python, this is different to other languages. A good example is Ruby which has it's repl as a seperate binary 'irb'.
- sklogic 11y agoThere is no interpreter for Swift. At least not yet.
- schappim 11y agoAm I missing something from this article: https://medium.com/swift-programming/1-learn-swift-by-running-scripts-73fdf8507f4b#.1utumj3wa https://medium.com/swift-programming/1-learn-swift-by-runnin...
- sklogic 11y agoYes, unfortunately, there are far too many people who do not care about using correct terminology.
- schappim 11y agoIf /usr/bin/swiftc is the "swift compiler" what would you call the binary: /usr/bin/swift ?
- sklogic 11y agoIt is a Swift REPL. Do not confuse REPL with an interpreter.
- schappim 11y agoTo answer my own question: "swift" or "swiftc" w/o -frontend invokes the driver, which launches both the -frontend and other tools like ld. The Swift REPL (Read-Eval-Print-Loop) acts like an interpreter. Valid statements, expressions, and declarations are immediately compiled and executed.
- schappim 11y agoAlso just so I know I'm not going mad: https://www.google.com/#q=%22the+swift+interpreter%22 https://www.google.com/#q=%22the+swift+interpreter%22