Swift: Apple's Biggest Achievement For Coders 337
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?
One more in a crowded field (Score:5, Insightful)
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.
Re: (Score:2, Interesting)
No, and that's what Apple wants.
Most developers will pick Apple over Android. Then you have to rewrite the code for Android. Apple will get first release on a lot of apps, just what they prefer.
Re: One more in a crowded field (Score:3, Informative)
Most developers? I don't know who you have been talking to or what you have been reading (maybe you work at Apple?), but the Android market share is much greater than the Apple market share. Plus it doesn't take much for a Java dev to turn his/her skills to Android, and C is the only language more popular than Java. In reality I doubt either platform will have issue finding developers.
Re: One more in a crowded field (Score:4, Insightful)
the Android market share is much greater than the Apple market share.
For phones, yes. For apps, no. The average iOS user buys far more apps than the average Android user.
Re: One more in a crowded field (Score:4, Insightful)
Re: (Score:2)
Re: (Score:2, Insightful)
Most business models for apps are based on people using the apps. While Android leads in terms of unit sales, iOS leads (by a surprisingly large margin) in terms of app installs and usage. There are a lot of Android phones that are basically used as "feature phones" with the ability to browse the web and run apps ignored.
So if what you care about is people installing and using your app, the numbers drive you to iOS.
Re: One more in a crowded field (Score:4, Insightful)
That's why the top 10 flashlight apps in the Android App Store all need access to networking, your SMS, mailbox, contacts, etc. "creative ideas for monetization" indeed.
Re: One more in a crowded field (Score:4, Insightful)
And I have the exact opposite experience. We have 8x the usage on iOS vs android, and android users complain a lot more (some legit, some just outrageous requests)
Re: (Score:3)
Gee. One registered user, and one anonymous coward, each with direct opposite experiences.
Who can I believe, who can I believe...
Re: (Score:2)
It is for people who want to sell apps.
Re: One more in a crowded field (Score:5, Informative)
Most developers? I don't know who you have been talking to or what you have been reading (maybe you work at Apple?), but the Android market share is much greater than the Apple market share. Plus it doesn't take much for a Java dev to turn his/her skills to Android, and C is the only language more popular than Java. In reality I doubt either platform will have issue finding developers.
He is talking about profit potential, not who's got his OS installed on the most devices. The implication is that iOS development is more profitable than Android development which is something that I have heard from more mobile developers than just him.
Re: (Score:2)
We may not be able to prove that a particular app isn't spying on us, but I can state with a high degree of confidence that said app isn't installing spyware on my device!
Re: (Score:3, Informative)
And Apple apps don't spy on you?
How can you prove they don't?
Well, for a start, you can deny them permissions when they try to do something you don't expect. When the Happy Kitty Screen Saver wants to access your camera and contacts on an Android tablet, you can't. You already had to accept 'let this app do random crap' when you installed it, or you wouldn't have been allowed to install it.
As far as I'm concerned, Android isn't much use for anything other than a mobile web browser until it gets proper per-app permission controls.
Re: (Score:2)
1. The odds of any of my Android devices getting an upgrade to that version are roughly zero.
2. As I understand it, only apps written for the new OS will have real permission controls.
Re: (Score:2)
If you are a developer, market share shouldn't concern you too much, as it changes every month when something new comes to market. Installed base is what most people would go by.
There are very few reliable means of collecting installed base stats, but a cross-platform SDK from an ISV who isnt affiliated with any of the platform providers, powering many popular games would probably be a good first stop [unity3d.com]
Re: (Score:2)
Not really, because iOS has native 3D APIs. Unity is used by some of the developers that are multi-platform. But those developers who are iOS only, and there are many, are probably not using Unity.
Re: (Score:2)
... the Android market share is much greater than the Apple market share ...
And app revenue is 1/4 to 1/5 on Android compared to iOS. Its actually still more profitable on the iOS side due to its users spending more per app.
Plus it doesn't take much for a Java dev to turn his/her skills to Android, and C is the only language more popular than Java. In reality I doubt either platform will have issue finding developers.
And C/C++ is probably what the core of your app should be written in so its portable to iOS, Android, Linux, Mac OS X and MS Windows. Only the user interface code needs to use java, swift, or objective-c. And its often best to just rewrite the UI in the language of the API for each platform.
Re: (Score:2)
Or use Qt for the frontend.
Honestly: it makes no sense at all to rewrite GUI code.
50% or more of the code for an app is GUI ...
Re: (Score:3)
QT gives you a "least common denominator" GUI everywhere. If your UX matters at all, you're better off writing a native GUI layer for iOS and Android, so your app doesn't suck compared to competitors.
Re: (Score:3)
This is more or less true for desktop platforms. But for mobile, the design you're expected to adhere to on different platform is sufficiently different (and not just in the way buttons look, but general layout and flow) that an app like that really sticks out like a sore thumb.
One-size-fits-all, a way to sabotage your app (Score:2)
Or use Qt for the frontend.
Honestly: it makes no sense at all to rewrite GUI code.
50% or more of the code for an app is GUI ...
No, it absolutely make sense to use the native api of a platform to create the user interface. Otherwise you app does not look or behave as expected and that has been shown to be harmful to an app's success. So if its an internal enterprise app that people will be told to use, fine, take that shortcut. However if your app's success depends on being embraced by the public absolutely beware of these one-size-fits-all solutions. Your app must look native, it must look current, it must support all the built-in
Re: (Score:2)
Or use Qt for the frontend. Honestly: it makes no sense at all to rewrite GUI code.
No, it absolutely makes sense to use the native api of a platform to create the user interface. Otherwise your app does not look or behave as expected and that has been shown to be harmful to an app's success. So if its an internal enterprise app that people will be told to use, fine, take that shortcut. However if your app's success depends on being embraced by the public absolutely beware of these one-size-fits-all least-common-denominator solutions. Your app must look native, it must look current, it mus
Re: (Score:2)
Re: One more in a crowded field (Score:4, Interesting)
... and C is the only language more popular than Java...
Nitpicking here. I started with C nearly 3 decades ago, I switched to Java but I'd be able to pick up C again in a very short time. Large parts of large/huge systems I design in C structures as they provide a nice abstraction of the underlying hardware. No matter how much I like C, it's no longer number 1 when considering the number of programmers involved. It's "too technical" for application programmers. Considering that financial programmers push the numbers and that they are moving from COBOL to Java, I see Java as the COBOL of the future. The upshot is that Java is good enough to do almost anything and much more elegant than COBOL.
Re: (Score:3)
Quoting the article you linked:
"The figures given here relate to profits generated by handset makers, not the services ecosystem and potential profits made by app publishers and others..."
Re: (Score:2)
Re: (Score:2)
Hahahahaha
Re: (Score:2)
First of all, I'm a developer.
So, I work for a company who wants the product on all platforms... we dev on all platforms, and we even outsourced a windows app (ha!). But anyways, it's true. It's way faster to iterate in Android than it is in iOS. So our features come out on Android first.
I can hear everyone saying "get better iOS developers!" Well, maybe. But I don't think so. The devs are pretty much equally capable on both sides. Maybe Swift will change things, but the reality is is that Android developme
Re: (Score:3)
You can currently write Android apps in Swift with Apportable [apportable.com]. Although Apple doesn't blow a whistle about this, most of the low-down parts of the stack are open-source. Moving up, Apportable have implemented in-house versions of Foundation, UIKit and so forth.
In the coming months, Apple will be releasing Swift for Linux, though its not clear whether that will include Foundation and UIKit. If not I can see the Apportable ones possibly being open-sourced in the future.
Re: (Score:3)
http://arstechnica.com/apple/2... [arstechnica.com]
Re:One more in a crowded field (Score:5, Interesting)
No, it's Apple specific. However that's OK because there's a language which is much like Swift, except it runs on pretty much every device you might have.
That language is new. It's called Kotlin [kotlinlang.org], and it is from JetBrains, the makers of the highly popular IntelliJ series of IDEs (+ WebStorm, PHPStorm, RubyMine, PyCharm etc).
Kotlin targets the JVM and JavaScript. It interops perfectly with Java. That means code written in it runs on Windows, Mac, Linux and Android. Additionally, via the RoboVM project [robovm.com], JVM bytecode can be compiled to native ARM iOS/OSX binaries. There is no JIT compiler. RoboVM provides bindings to all Objective-C APIs on iOS so you can build native UIs and access all the same functionality as a native app. Programs written this way are on the app store, so Apple is cool with the technique.
Kotlin has a clean, concise syntax and many modern features that match those in Swift. For example it has nullability/optionality integrated with the type system. It has Markdown comments. It has extension functions. It has some support for pattern matching. It has named parameters. It has the ability to define "data classes" that have easy immutability, content equality, hashcodes, serialization etc all in a single line of code. It has type inference and compile-time inlined lambdas, so you can do high performance functional programming with it. It has features to support complex DSLs. It has a full IDE with many built in refactorings, online static analysis, and via the JVM it has high quality CPU/memory profilers and debugging support.
In short, programming with Kotlin is much like programming with Swift, except you have better tools, an IDE at least as strong as Xcode and in my experience stronger, and you can write apps with it that are indistinguishable from native iOS and Android apps.
Re: (Score:2)
Oops, I forgot something important.
There is a simple web based IDE that you can use to experiment and learn the language at try.kotlinlang.org [kotlinlang.org]. For me it seems there's a layout issue with Chrome right now, but it works fine in Safari.
Re: (Score:2)
I get what you're saying, and agree with you, but from what I can tell it's not trying to be an IDE, just a way to try out the language in a browser. With all of the examples, it's a good way to get a taste of what the language has to offer. Just my 2 cents.
Re: (Score:2)
I get what you're saying, and agree with you, but from what I can tell it's not trying to be an IDE, just a way to try out the language in a browser.
I know. I was just having a lark. :-)
Re: (Score:3, Informative)
No, it's Apple specific. However that's OK because there's a language which is much like Swift, except it runs on pretty much every device you might have.
Well, pretty much any device accept the odd iPhone here and there?
Looks like they are trying to create a Swift clone. Excuse me, but I think I prefer the real thing. Which will quite soon run everywhere, unless Google throws its toys out of the pram. And which has the brains of LLVM behind it. And most importantly, which is in actual use. Maybe Swift will never be as good as Kotlin's claims, but Kotlin will never be as good as Swift.
Re: (Score:2)
Exactly. I've grown tired of all these new languages that claim to be better than the real thing. You're far better of using "the real thing", and I've never liked IDEA as an IDE (mind you, I think XCode's code editor and workspace tabs suck, too, but I've learned to tolerate it).
Re: (Score:2, Informative)
Looks like they are trying to create a Swift clone. Excuse me, but I think I prefer the real thing. Which will quite soon run everywhere, unless Google throws its toys out of the pram. And which has the brains of LLVM behind it. And most importantly, which is in actual use. Maybe Swift will never be as good as Kotlin's claims, but Kotlin will never be as good as Swift.
Kotlin has been released in 2011, so I don't think it tries to be a clone of Swift. It's more a "Java replacement", like Ceylon, Gosu or Fantom, which is not a bad idea when you have something like Oracle Corp which get to decide how to manage an open technology (Java...)
Re: (Score:2)
Looks sharp. They need to hire a Marketing Dork to come up with a name that either means something to someone besides Mrs. Kotlin, or is otherwise snappy and memorable. Otherwise, it's going to be hard to gather any mindshare.
Re:One more in a crowded field (Score:5, Informative)
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.
Well, Apple just announced [opensource.com] that they are planning to open-source Swift and will be also be releasing a Linux version of the compiler. So the language itself isn't going to be Apple-only for much longer.
However, that only solves the language problem - the big divide between platforms is the totally different APIs that developers have to learn. Frankly, that's usually a bigger learning curve than picking up a new language.
Mind you, you can say the same for most of the big languages - off the top of my head only Java (and maybe Javascript/HTML5) come with baked-in crossplatform APIs suitable for writing GUI applications.
Re:One more in a crowded field (Score:4, Insightful)
Just as with Objective-C, I doubt that hardly anybody else will make use of the language.
The problem is it just doesn't have all that much to offer for projects that are already making use of other languages. It's got a few slick features, but it can't really stand out all that much and the library support is going to be very far behind more mature languages for a long time (if not forever).
Re: (Score:2)
Objective-C never took off elsewhere because C++ was pretty much an equivalent (lacking runtime introspection but making up for that by being a little faster).
Swift on the other hand has a lot of desirable features, that are not available elsewhere. I've listed some in a post under the last Swift story we had. So either some other language takes on these features, or at least some non-Apple programmers are going to be attracted to Swift.
Library support is easy, as Swift can adopt C based libraries. Either c
Re: (Score:2)
Re: (Score:2)
And then your app can have the desirable quality of feeling equally not-at-home on every platform.
Re: (Score:2)
Just like they plan on open-sourcing Facetime?
Most likely, and if something similar to the patient issue with FaceTime crops up I wouldn't be surprised on a reversed course similar to what happened with FaceTime. That said I'm assuming that the hints that they wanted to open source the language at it's introduction combined with delay between then and the announcement of planning to open source meant they may have taken steps to avoid such issues this time.
Swift is (shortly) everywhere, including Linux (Score:4, Informative)
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.
Re: (Score:2)
"How's Swift's cross-platform suitability?"
Apple just open-sourced Swift, in hopes that it will be ported to other platforms.
Swift's compatibility is largely irrelevant (Score:2)
How's Swift's cross-platform suitability?
Well its now available for Linux and it has been open sourced.
But more importantly its compatibility is largely irrelevant. Keep the UI and core code separate. The core of an app/game should usually be written in C/C++ for compatibility. Its not all that difficult to keep core code in C/C++ compatible for iOS, Android, Mac OS X, Linux, and MS Windows. Been there done that plenty of times. And its often best to just go with the language that is native for the platform with respect to the UI code.
Re: (Score:2)
Microsoft has already announced [arstechnica.com] an Objective-C toolchain for Windows that certain select groups have already been using.
With Project Islandwood, iOS developers will be able to take their iOS apps and build them for Windows. Microsoft has developed an Objective C toolchain and middleware layer that provide the operating system APIs that iOS apps expect. A select group of third parties have been using the Islandwood tools already, with King's Candy Crush Saga for Windows Phone being one of the first apps built this way. King's developers had to change only a "few percent" of the code in order to fully port it to Windows Phone.
What methods "see if you have a single reference" (Score:2)
the ability to see if you have a single reference (a feature of reference counting) is a feature needed to optimize string and collection types
What is that? Are you referring to weak variables where the reference goes to nil when the underlying object does? Garbage Collection systems have such references also (Java for one).
Quiet schmiet, frosty already (Score:5, Funny)
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.
It's there (Score:2)
Swift was mentioned on CNN here [cnn.com]
It was also mentioned on BBC here [bbc.com]...
I've seen mentions of it all over, on a lot of non-tech web-sites. That has been kind of amazing.
Coding is starting to matter more, especially as black hats affect more and more people - so people are starting to care about it more generally, even if they don't really understand details yet.
Re: (Score:2)
which is great because we need to rid ourselves from the c language and all the crime it spawned.
Swift isn't a replacement for C.
Re: (Score:2)
Swift isn't a replacement for C.
The OP said:
which is great because we need to rid ourselves from the c language and all the crime it spawned.
"The crime it spawned" presumably includes C++ and Objective-C, and Swift is certainly meant to replace Objective-C.
Programming is, slowly but surely, maturing. The value of static typing over dynamic typing, strong typing over weak typing, safe memory programming languages over unsafe memory programming language, etc. is becoming undeniable.
Good riddance to C, and all the crime it spawned. :-)
Re: (Score:3)
The value of static typing over dynamic typing, strong typing over weak typing, safe memory programming languages over unsafe memory programming language, etc. is becoming undeniable.
Now you are dreaming.......have you looked at Javascript?
Re: (Score:2)
Now you are dreaming.......have you looked at Javascript?
Yes, it's terrible. Its popularity is merely a historical accident.
Re: (Score:2)
Re: (Score:2)
Re:Yes, but it will be a while. (Score:5, Informative)
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.
Re: (Score:2)
So for a long time people at Apple will keep using the giant codebase they're familiar with but app developers, Apple and otherwise, will use Swift going forward. For the Universe minus Apple's OS developers, the statement is true.
Re: (Score:2)
Yes, they will keep using the very language that is being claimed to be "on the way out". Sort of like how Microsoft never stopped using C or C++ for system libraries and APIs even after .NET came out.
Re: (Score:2)
Being "on the way out" means new code.
Heck there's still old code written in Cobol that's still in use by some organisations, but you wouldn't argue that Cobol isn't on it's way out.
And yes, it's only a matter of time before Apple is writing new libraries in Swift. Swift is absolutely intended to replace system code as well as app code.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
Still early days. Swift is mature enough for developers that are new to iOS/OSX to use. As yet there's no a huge incentive for Objective-C developers to change, especially when working on existing projects. But the time will come when creating a new project, and Swift will seem like the natural choice.
Re: (Score:2)
Re: (Score:2)
Re: (Score:2)
I doubt it. There's rarely a good reason to re-write existing code. I think they'll start doing new libraries in swift. Maybe even new APIs in existing libraries. But I don't see them doing a whole rewrite of Cocoa.
Re: (Score:2)
Re: (Score:2)
No it isn't. The Swift runtime is entirely different to the Objective-C runtime. However, if you want to write a usable app with a GUI, you do need to use the Cocoa libraries which are mostly written in Objective-C.
Re: (Score:2)
Well not entirely different. The Swift object model runs on top of the Objective-C runtime. For the most part Swift doesn't have to call down to that runtime unless you are interacting with Objective-C. But it will if you mark a property as dynamic, regardless of interaction with Objective-C.
But most of the time you're not doing that.
Re: (Score:3)
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
That survey is problematic... (Score:5, Informative)
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"
Re: (Score:2)
Swift 77.6%
C++11 75.6%
Rust 73.8%
Go 72.5%
Clojure 71.0%
Scala 70.6%
Swift, 6.6% more loved than Clojure, and a full 7% more loved than Scala.
Yep, sure sounds like a selling point.
Re: (Score:2)
Re: (Score:2)
Objective-C is now legacy - but not quite dead (Score:3)
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.
Re: (Score:2)
Objective-C is hardly "legacy" considering most, if not all, of the new system libraries and APIa in both iOS 9 and OS X 10.11 are written in Objective-C. Not a single system library or service is written in Swift.
Re: (Score:2)
Re: (Score:2)
That will change over time.
No, it won't. Unless you're going to claim that Apple is going to stop supporting C development on their systems. Because the only way to support C in this supposed future where system frameworks will be written in Swift is that Objective-C will still need to be around.
Re: (Score:2)
Objective-C IS NOT C. Darwin the operating system kernel underneath the UI is written in C, C++..... not Objective-C.
The UI APIs and Objective-C are what we are talking about... So no, Objective-C to continue being used going forward is not in the same league.
Re: (Score:2)
That's not true. While it's possible to use Objective-C frameworks from C, in practice, nobody does this. People writing C for Apple platforms don't usually call out to Objective-C from C, they call into their C from Objective-C. Entirely replacing Objective-C with Swift won't change this - you can call into C from Swift just as you can call into
Re: (Score:2)
What are you talking about? Swift supports C libraries just as much as Objective-C supports C libraries.
Maybe, when Apple release Swift for Linux, you can actually have a play with it, and begin to know what the fuck you're talking about.
Re: (Score:3)
Swift was designed from the ground up to be as performant as Objective-C and as a replacement language for the language that they actually write the APIs in. In essence Swift is a systems
Re: (Score:2)
It's actually designed to be more performant than Objective-C. The clue is in the name. Unless you opt in, Swift doesn't do dynamic despatch. It's also designed from the start to be easy for the compiler to optimise.
Swift can be slower than Objective-C if a naive translation of Obj-C to Swift code is done. However, writing an algorithm using using the best available features of Swift will generally mean Swift is far faster.
Objective-C isn't fast enough for many system frameworks, which is why even modern on
Re: Objective-C is now legacy - but not quite dead (Score:2)
Rubbish. .NET was designed as an application development environment to replace VB/Java and COM+, not C++.
Goodbye Objective-C (Score:2)
It's clear that Apple wants to replace Obj-C with Swift. So eventually it's going to happen. Since the Obj-C tools will not be maintained.
Will Swift make inroads outside the Appleverse. Some but nowhere near as much as Apple and it's fanboys are hoping.
Re: (Score:2)
Will Swift make inroads outside the Appleverse. Some but nowhere near as much as Apple and it's fanboys are hoping.
Why that needless attempt at an insult? Especially when it's obvious that you haven't thought this through. You also spelled "fanboi" wrong.
Re: (Score:2)
People keep on about Apple dropping support for Objective-C, which seem ridiculous to me. A huge number of OS X's existing APIs are Objective-C based. And if nothing else, these are likely to remain for the next decade or two simply to maintain compatibility with today's apps, nearly ALL of whom are written in Objective-C. There are also a number of APIs Apple relies on that are C based as well, which requires either C/C++ or Objective-C to interface with. You seriously think Apple is going to replace O
Re: (Score:2)
Meh (Score:3)
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.
Re: (Score:2)
solving problems that don't need a solution, like fucking optionals.
Doesn't need a solution? The fact that you don't know when you receive a pointer whether it's allowed to be nil? It's a huge problem. Always has been. A very common cause of bugs. A very common case of error handling that is not done when it should be or done when there is no need.
And Obj-C translating a method called on a nil pointer to no-op generally just hides problems.
(I'm an iOS Obj-C developer on one of the most popular apps on the store. We haven't started using Swift yet, but now 2.0 is out I'll be
Okay, poll... (Score:3, Insightful)
How much did Apple pay for this article?
"Shake things up?" (Score:2)
Swift may "shake things up" in the Apple world, but to other platforms, it's just another language among many. The fact that Apple has focused almost exclusively on Objective-C means it's a major change for their developers, but no other platform has ever had such a single-language focus and won't be affected anywhere near as much.
I realize that to Apple fanbois, Apple and it's platforms are the world, but to the rest of us, they're just one of many fish in the IT sea.
Re: (Score:2, Informative)
And VB was a hugely popular language for writing business apps and one of Microsoft's best selling products.
Re: (Score:2)
And Business apps is where you routinely find the dumbest coders, the slowest and most unreliable code and the worst coding practices and mistakes. In fact, making coding easier is probably the number one factor why so much code sucks.
Re: No (Score:3)
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.
Re:Frustrating type conversions (Score:5, Interesting)
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.
Re: (Score:3)
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.
Re: (Score:2)
If you are converting a double to an int, you need to think about whether you want to round down or round up, for both positive numbers and negative. A step to make the conversion explicit is good, even if you are doing the most common thing.
Consistency is also an issue where a project has multiple coders. Where a method takes a float, it fucking annoys me when some people have variously put 0, 0.0, or 0.0f.