Introductions should be about learning how to reason about abstractions, and how to transform problem-solving from what's going on in your head into code. When you start out with something so rigid like C or Java you really confine a student's ability to reason about a problem because there's so much syntax to keep track of.
- Python does not have a type system worth mentioning.
Python has a strong dynamic typing system, with metatypes, type rewriting and so on. You couldn't be more wrong. What it is missing is an easy way to declare interfaces - the idea is to use duck typing and handling exceptions when something goes wrong.
It doesn't make sense to run Swift (or Objective-C) without the underlying platform API. You can do it (and Apple does; iTunes for Windows is built with such a shim) but it's not practical.
The only reason Swift even exists is that no other language (other than Objective-C) fit with the object model of the OSX API. So they had to make their own. As much as other languages don't interface well with OSX is as much as Swift doesn't interface well with every other platform.
Once it is, I think the reasons explained in this article for using Swift as an introductory language make sense.
Swift is not open source. It might be in the future, and if they do follow through, the release is slated for "later this year." I hope they do, but I also can't blame anyone who decides to wait and see.
By now, 99% of people have forgotten that FaceTime was ever supposed to be more than video calls between Apple devices. I'd hope they won't try and pull the same thing on the developer community who tend to be more in the loop.
Pay attention to Chris Lattner and his track record if you want a realistic view of whether the open source promise is likely to be kept for Swift.
1. Where am I going to test my applications? Not all students have Apple's products (I never had any of them). On the other hand, if I use Python, or Java, or C/C++, I can test my application wherever I want.
2. As far as I know, Swift will be open source (at least, that's what Apple said). But Swift is not open source _at the moment_ (please correct me if I'm wrong).
3. Swift is a new language. If I type "Swift tutorial" on Google, and I type "Python tutorial" on Google in a second tab, I'll get much more relevant results for much more platforms when I type "Python tutorial".
I don't care how good the syntax is. If a programming language is not currently available on like every platform and if I can't build my application using whatever I want to use (including a text editor and a compiler), it's not a good choice for students no matter what you say.
He lists that there's no Windows IDE, which is far from being able to run the program everywhere and using whatever I want to use to build it (as I have said it). I also think that .NET languages (like Visual Basic .NET and C# .NET) are not a good starting language, even though one of them was my starting language thanks to my high school and my college (both taught me Visual Basic .NET for one year). Plus, he states that Swift is open source at the moment, which, as far as I know, is not true. He didn't mention any of those three points I made.
EDIT: Replaces .NET with .NET languages.
And if you are using Java, not only can you test your application wherever you want, you can also write it wherever you want.
Languages that don't offer this multiple flexibility will have a tough time becoming a main teaching language in schools.
I'm the least fan of GC as anyone else but needing to have intro students worry about cycles seems like the last thing you want to teach first.
1) I want to use a single teaching language.
2) We need to teach them about memory management.
3) C style manual memory management is too hard for beginners.
If you accept #1 and #2, you can't start with a language with the full 'magic' of garbage collection, as it would have to be the only language, and you cannot teach #2 with it.If, in addition, you accept #3, ARC makes sense to me. You can have your pupils implement quite a bit of advanced data structures such as trees and tries before you hit your first cycle, but there are 'real' data structures that use them, so you won't have to make up some artificial example to find one. Until that time, you can let your pupils think that the machine reuses memory as soon as it is no longer referenced.
I think his arguments make some sense, but I am not sure I'm fully behind #1.
What he's wrong about is that the choice is C style, ARC or full GC. There's another intermediate step which is achieved by using C++11 smart pointers - manual reference counted memory management.
Don't believe anybody who uses either of these tactics.
It's why I think Javascript is the best language to teach beginners. Yes, it's an ugly language. Yes, it has significant structural problems. Yes, it will bite you in hilariously difficult to find ways. But that doesn't particularly matter compared to teaching them that they can futz around with code and get interesting stuff done.
also, swift has syntax that can bite new developers just like any other language.
I have access to all kinds of systems, but this is not a consumer item, and it should work everywhere; a mac-only requirement is just as unacceptably limiting for general purpose computing as a windows-only requiremet.