Swift: Apple's Biggest Achievement For Coders
GordonShure.com writes: Despite its publicity and hype being rather quiet by Apple standards, the Swift programming language has attracted praise since its release last year. Swift is one of the few Apple products that represent a departure from the hardware-led Steve Jobs approach to the business. If this year's survey of coders by Stack Overflow is anything to go by, it looks as if the language might have potential to really shake things up in a landscape which has been little changed since the 1990s. Might the days of Apple programmers relying upon objective C be numbered?
How's Swift's cross-platform suitability?
There are two Apple platforms, one popular Google platform, one less-popular Google platform, plus Microsoft's platform. Is Swift suitable for writing applications for all? If not, developers would be writing for a limited, albeit popular platform, but limited to a certain subset nonetheless.
Do not look into laser with remaining eye.
I haven't seen it mentioned on CNN or the BBC, but there's about a dozen stories about it per day on a former tech new website.
In fact, it's pushed 3D printers off the number one spot.
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
Obj-C is on the way out.
Uhh, no. So much of the system libraries on both OS X and iOS are written in Objective-C and they aren't going anywhere. Also, all the new APIs of iOS 9 and OS X 10.11 are still written in both C and Objective-C with Swift bridge headers. Basically, it's the opposite of what you claim.
I'd guess that we're about a year away from the point where the majority new code at Apple is written in Swift.
Maybe at the application level, but not for system libraries.
And VB was a hugely popular language for writing business apps and one of Microsoft's best selling products.
If this year's survey of coders by Stack Overflow is anything to go by, it looks as if the language might have potential to really shake things up in a landscape which has been little changed since the 1990s
"Most Loved"
"Most Wanted"
Antisthenes: "Wisdom begins by examining the words/names." - excuse my English, i am (slightly...) better with my Greek!
Swift in its first year has become the preferred language for developing on the Apple platform. Objective-C is being "improved" but only as a bridge to support interoperability with improvements that are being incorporated into Swift.
There is a lot of Objective-C code that will have to be maintained, and over time it will be replaced with Swift code... but it won't disappear overnight. In a year all new development is likely to be done in Swift, while Objective-C is just maintained.
Eventually -- in many years time as Objective-C code is revisited it will be phased out.... but it will be a very long time-frame.
If you are starting development on a new application - you would have to be very short-sighted to pick Objective-C as a starting point.
In the keynote they announced Swift being open source later this year, including releasing versions for Linux...
Having done over a decade of backend work in the past, I think it would make a pretty good server language also. It's all about the libraries and frameworks that support what you are trying to do.
"There is more worth loving than we have strength to love." - Brian Jay Stanley
I don't know, most long time iOS developers I know, including myself, aren't really jumping all over themselves to adopt Swift. I mean the writing is on the wall obviously, and Apple will eventually drop Objective-C down the road, so we'll have to eventually adopt it. That's the attitude I'm seeing among people I know. Personally I don't particularly like it that much and it seems to be solving problems that don't need a solution, like fucking optionals. That said, there are features of the language I like but I wish they had just continued to develop and refine Obj-C, honestly just getting rid of the bracket syntax and adding some of the features from Swift would satisfy me. Apple characterizing Swift as "Obj-C without the C" couldn't be more wrong. It's more like "C++ without the C" or "Obj-C without the Small Talk"
Most of the talk about Swift seems to be coming from people that aren't iOS developers and don't really have any idea what they're talking about.
That would probably have prevented the annoying bug I ran into a few years ago where someone copied a 64-bit time_t to a 32-bit int, did some arithmetic, and then copied it back to a 64-bit time_t, requiring us to update firmware at all customer sites to fix it. If they had to explicitly convert, they'd almost certainly have realized they were doing something wrong.
That bug alone probably cost us more money than the time required for programmers to always explicitly convert types.
How much did Apple pay for this article?
Nearly everything?
Aren't most things currently running in "managed" (with a Virtual Machine, and garbage collection) environment these days? Swift is interesting, in that, like Objective-C it uses Automatic Reference Counting (ARC) for memory management, along with a syntax that is appealing to younger developers. ARC gives almost all of the benefits of garbage collection, at the same time as being compiled in, so it doesn't require CPU clicks at run-time. For mobile this (which is where everything is going) this gives superior performance and battery life. I'd say we're moving in this direction, not away.
If it acquires resources on instantiation like a duck, then its a shared_ptr<Duck>
Trust me, when I assign a double to an int, I know I lose the mantissa. .
Since it's actually the exponent you lose (and maybe also some or all of the mantissa depending on what the value of the exponent was), I really think you need to start using a language that gently reminds you that converting from a double to an int is not necessarily a trivial exercise.
All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
No, objective-c is apple's VB - a shitty language that everyone was more-or-less forced to use long ago if they wanted to use their platform (cocoa/office).
I'd say swift is more like apple's C# - a modern language that everyone (including mocrosoft) wishes every VB/objc developer would switch to. Asap.