Swift is a terrible starter language

Swift 5 does not make a good language for beginner programmers.

The language has safety features are a great boon. Xcode’s live preview helps. SwiftUI has great promise. These things aren’t enough. Or to put it another way, there are some major flies in these ointments.

The language’s type inference, in an attempt to provide typing shortcuts and brevity, mean the compiler gets very confused when the user makes a speling error or uses the wrong symbol. This causes error messages propagate to very strange places many lines away from the actual error.

The language lacks semicolons. These syntactic flags are useful in other lanaguages because they offer “restart” points when a statement is in error. Without a clear idea of when a state starts, the compiler can’t help with the lines after an error.

The API documentation is empty, lacking explanations of basic purpose, common use cases, interesting use cases, and brief code examples. The few sample project sof the past are aged beyond usefulness. Even in their prime they are too comprehensive and full of distraction to make clear how a specific parameter, method, or type works.

The compiler is slow. Xcode must index the entire codebase in order to provide typing suggestions. So because the compiler is slow, one change may cause a full re-index, so suggestions are unavailable. That can cause user errors as the programmer tries their own guesses. 

The debugger remains mired in bizarre system stack frames. The APIs are so context-free they give obscure error messages with no hint as to likely use cases they may be done wrong. (Some error message are actually helpful, but these are rare.)

The debugger doesn’t present user data in an easy to understand way. Hover displays are primitive. The “po” command is primitive but a vital tool for checking data.

The summary problem here is that developer time is the most expensive part of software development, and Swift’s flaws and Xcode’s shortcomings do not sufficiently address programmer efficiency. For comparison, see C# and Visual Studio. Apple is coming from a place of computer efficiency. That makes for very smooth animations and responsive apps, but the cost in development productivity is severe. The good news is this has been improving with each major release of Xcode and Swift, but tose releases are more than a year apart and that’s just not fast enough.