by aidanf · 11y ago · 0 comments
It's aimed at developers (like me) who can already program in a language like Ruby or Python and are looking for a quick tour of Swift.
It's available to read for free online at http://books.aidanf.net/learn-swift
I'll be adding stuff about yesterdays announcements in the next couple of weeks.
It breaks everything I've ever written, for no good reason. I also end up with a much smaller pool of libraries to choose from for new projects.
It makes no sense. In a microcosm of the universe where Python was the only game in town, Python3 would have worked out. Instead of moving to 3 and losing many advantages for churn, I can just go spend time with something else. Swift is pretty what I'd design if I could pick and choose features, so it's perfect for me- excited I'll be able to use it serverside while simultaneously learning the language for iOS.
Also, people frequently cite that moving from 2->3 is easy. It is. But they somehow forget that testing old, large projects is extremely labor intensive and always results in breakage. Unless you have 100% test coverage, which I know no one who does.
As far as unit testing goes, you are absolutely right. I unit test everything....I mean, I was taught TDD right out of the door at Uni, and though I don't exactly follow the methods strictly, I am at my core, a functional programmer. I want every last bit of code I write to do one and only one thing well. I, therefore, test all of those functions, no matter how mundane. But you know what? Even then, my test coverage on a good project, where I'm not just dicking around probably hovers about 85-95% coverage. There's just always some flotsam and jetsam that escapes the tests. First time I worked on a project with a team, I stressed my head off because of that very fact, until we did our first metrics review and I saw that I was actually ahead of most people....
You say modern but I don't think it's really what you mean here.
Your descriptions of Ruby vs Obj-C make it seem that really what you mean is high-level; that is, to a newer programmer, easier.
These languages (Haskell excepted) make it very easy to do simple things. Describing them as "modern" in contrast with the implicitly antiquated Obj-C makes it a little hard to take your assertions seriously.
Verbosity is a claim to make, age is not.