Choosing Swift as a first language

Cross Platform Language doesn't matter. This is like saying people should have used Objective-C because it was "cross platform." What matters is that the predominant Frameworks and Libraries are available across platforms. That is often the point at which code becomes platform-dependent, not the language itself - unless you're using a very bad compiler that implements lots of non-standard extensions.

For example, would it matter if Free Pascal was 100% compatible with Delphi, if your code uses incompatible VCL Classes that have no LCL implementation? Nope.

This is the issue that Swift presents. Apple is most likely not going to port Cocoa to Linux (and certainly not Windows) because it would be too troublesome and expensive, for very little gain.

The language is designed for C (Objective-C, by extension) interop because they need it for Cocoa. It lacks C++ interop and it's not the highest priority because Apple does not use C++ for their Frameworks.

This means Swift on Windows (as a Native Language) is going to be about as productive as using C with GTK+ or Win32 API for an Application Developer.

That's a way-back machine to 1990 for Windows Developers.

No one is going to drop Visual C++, .NET, Delphi, or FPC/Lazarus for that. The Productivity hit is too great and the amount of wheel reinvention is going to be massive.

It will also put Swift developers on non-Apple platforms well behind C++ developers (which many of you would claim is "over-complicated") due to the lack of Libraries/Frameworks and [considerably] worse tooling outside of Apple's own ecosystem (Xcode, which is still quite a bit worse for Swift than Objective-C, which still doesn't even touch Visual C++ or IDEs like IntelliJ, Netbeans, or Eclipse for a myriad of other languages).

People oversell the "value" of a cross platform language. Yes, it's nice to have, but "language" is often not the reason code becomes locked to a platform.

This is why Libraries like Qt and wxWidgets exist, but Swift cannot use those.

/r/swift Thread Parent