Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Apple doesn't even make Mac servers any more. That means that until today the target audience for Swift programs was mostly consumer-grade hardware doing consumery-type things. Today it becomes a different animal: it's now on generic hardware doing anything you like. It has enough momentum and developers familiar with it to really compete with, say, Python in the near future.

You will see more server frameworks for Swift. It didn't make sense in a Mac-n'-iOS-only world, but now it's more interesting.

This is what I am hoping for Python has such a great community of software packages for doing server-side applications. I had to fall back to creating Python bindings for multi-purpose c++ server-side code that also is used in some desktop apps. It's easier to maintain one code base in one language then have a lot of the same functions written in a myriad of different languages. I would love to do it all in swift and be done with it. But, it will be awhile till that happens.
 
You will see more server frameworks for Swift. It didn't make sense in a Mac-n'-iOS-only world, but now it's more interesting.


I can see this. Not liking some of the more universal languages. And while an interest swift was till this a kind of yeah it looks interesting but I am coding for 1 system only (mac os...not into iOS as an interest). Limited time, what I do and learn would be nice if I can bring to work (windows server heavy, couple RH servers). So universal languages get the nod. Python works at home, work and x-system so I get more bang got the buck as it were. this could change. It be nice.

Its at least an option if carried out. Options never a bad thing I find.
 
I'm thinking about developing for iOS. I have almost zero experience with any kind of code, except for a little html in the late '90s. Is learning Swift all I would need to get started?
Not really. Swift will look very bizarre to you if you haven't done any programming at all. Maybe build gradually on top of your existing HTML knowledge with some PHP and JavaScript. Both of these have some of the flattest learning curves of all programming languages. Once you have a firm grasp of programming concepts like classes, objects, closures, scope etc, you can more easily transition to Swift, Objective-C or whatever.
 
Doesn't mean our interest and Apple's can't coincide.

Look at WebKit. Apple didn't open source Safari's rendering engine as a philanthropic gesture. They did it to break IE's hold on the market, so that Mac and Windows browsers would be on an even playing field. Chrome took WebKit and changed the browser industry. Maybe not exactly how Apple intended it, but it served their purposes. Apple won, Google won, the consumer won.





Exactly. This is good for Apple, good for developers, and good for us. The only one it hurts is competing languages, like C#, if it gets picked up.

They forked KHTML for webkit which would have been GPL'd so they couldn't really close it off.
 
  • Like
Reactions: Substance90
So is this a general all purpose programming language? Can we see a new OS built using Swift or the next Microsoft Office?

or is it just to build iOS apps?
 
While Swift surely has a long long way to go... Apple is moving fast, and I love it.

Swift is a breath of fresh air to code in.
While Swift has a lot of things going for it. It has long way to go on reliability and second party adoption. It reminds me of the early C++ or Java days where you have inheritance bugs in the compiler and adding a "do nothing loop" between code lines makes the compiler work.

When I see Swift ported out of the Apple Eco-structure building non-Apple community apps, then I'll take it seriously. Til then, is a first generation language with only a single company supporting it in the real world such as the first wave of Java at Sun.

If you are doing school or hobbyist projects that are not critical to a revenue stream, go for it! We'll hire you when the compiler is matured.

So is this a general all purpose programming language? Can we see a new OS built using Swift or the next Microsoft Office?

or is it just to build iOS apps?

For now, it is Apple spawn that the rest of the big boys are staring at like a 10 year old with a Christmas goose served in front of him for the first time. That is, they have no idea what it is, how you address it and if it is any good.

It typically takes a decade for a new programming language to catch on. I don't see any exception here.
 
So is this a general all purpose programming language? Can we see a new OS built using Swift or the next Microsoft Office?

or is it just to build iOS apps?
As Swift is (like many others) turing complete, it is indeed a general purpose language. But as others pointed out, that may not be sufficient at the moment, as to become a truely globally usable language, there needs to be more Frameworks supporting it. So far, Cocoa seems to be the only general purpose framework. A good choice, but strongly limited in terms of system support.

Is is JUST to build apps? No, I doubt people would agree to that. But the same way as people would say PHP is not only for writing Webpages. It is what it is designed for. So it seems at least.
 
So is this a general all purpose programming language? Can we see a new OS built using Swift or the next Microsoft Office?

or is it just to build iOS apps?

Yes. Apple designed Swift so that it could be used to write a whole OS. No doubt once the language becomes more stable, people will put those claims to the test.

These are the first 2 lines of the 'about' page (https://swift.org/about/)

Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns.

The goal of the Swift project is to create the best available language for uses ranging from systems programming, to mobile and desktop apps, scaling up to cloud services.
 
Yes. Apple designed Swift so that it could be used to write a whole OS. No doubt once the language becomes more stable, people will put those claims to the test.

Why would you think so? Can you point to any operating systems written in C#, Java, PHP, or JavaScript?
 
Why would you think so? Can you point to any operating systems written in C#, Java, PHP, or JavaScript?

For what it's worth, WebOS's entire equivalent of UIKit was written in Jvascript, which was pretty expansive use for the time. :)
 
Apple needs to do this for Swift and native development to stand a chance out there. Releasing Swift just fragmented the hell out of Apple development for years to come. No Apple developer can afford to be not be an expert in both languages now. But the new language and it's unstable state means even greater chances of projects going non-native IMO. So Apple has got to get Swift into a stable state and they have to do it fast. How many more things are going to change and break existing code before the dust settles? This thing has been years in the making and still no sign of stability. Swift is cool, but these are very early days still.
 
Last edited:
As I see it, Swift is an inferior language in most ways to most other languages. It has one thing going for it, which Obj-C had going for it too: you can write in the language, or you can't use Apple's App Stores (which means you can't publish on iOS at all).

Making it open source might fix a pain point - now it might end up being possible to write your code once in Swift and have it run everywhere - but only if people actually port it.

IDK. I'm sticking with C# in Unity 3D for cross platform game development and Python for server side code.

You didn't make an argument. Obviously Swift is not an option on Unity yet, and there are no web frameworks written in it yet. So, you're making a tautological statement here. These are early days. In 10 years maybe Swift will have a Django framework equivalent and then you can make a comparison.
 
As I see it, Swift is an inferior language in most ways to most other languages. It has one thing going for it, which Obj-C had going for it too: you can write in the language, or you can't use Apple's App Stores (which means you can't publish on iOS at all).

That's not entirely true. The OS is largely in Objective C, so you need to put up with a few Objective C calls, but thankfully, iOS does quite well with C and C++. This is similar to the way Linux is written in C, but you can still use C++ and make Linux apps. Just wish Apple also allowed assembly language, but you can see why they wouldn't want to deal with that.

And while it's true that had Swift been the result of some grad student in a computer science program, few would have looked at it, I'd like to think that since Apple is actually using SWIFT themselves, it will continually improve over time. After all, Apple nixed flash on iOS because it was too inefficient, so why hobble themselves with an inefficient language.
 
Apple needs to do this for Swift and native development to stand a chance out there. Releasing Swift just fragmented the hell out of Apple development for years to come. No Apple developer can afford to be not be an expert in both languages now. But the new language and it's unstable state means even greater chances of projects going non-native IMO. So Apple has got to get Swift into a stable state and they have to do it fast. How many more things are going to change and break existing code before the dust settles? This thing has been years in the making and still no sign of stability. Swift is cool, but these are very early days still.

I wholeheartedly disagree with this. If there's any indication from the developer community, it's that they have praised Apple's last two major updates to Swift. It may still be evolving, which was said from the moment of it's induction, but it's not unstable by any means.

You speak of stability directly as stagnation of foundational development but since the update cycles are slow and consistent, and expected and welcome, you've got to weigh the pros/cons appriopately. It would be completely irresponsible to simply dump a language like Swift into developers laps and simply never adapt to the needs of those developers using it - that would cause projects to go non-native as we can see with the trend of Objective-C switching Swift. Swift has a roadmap, but it's heavily shaped by the people using it. Plus, we're talking about iOS developers, who are already familiar with this type of update cycle.

I also think that you hardly need to be an expert in both languages, nor that achieving an equal level of familiarity across both is an impossibility or even that complex. The languages relate to each other and based on the resources available, many new-coming iOS developers who orient themselves towards Swift will pick up syntax on Objective-C, because they'll see it in parallel.

If someone feels Swift is too immature to even warrant attention, then that's the developers propagative. However, trends among mainstream iOS developers don't give a damn about any single one's hold ups. Development in Swift will be pretty swift because regardless of what people feel, it is a good language that has adopted really good features from other modern languages and it is going to get better.
 
  • Like
Reactions: prasand
For what it's worth, WebOS's entire equivalent of UIKit was written in Jvascript, which was pretty expansive use for the time. :)

Yeah, well, I guess I should be more clear on my point.

Swift, along with PHP, Java, JavaScript, Obj-C, C#, etc. are general purpose languages. That is not a formal definition, but it should be obvious that none of them are domain specific.

Turing completeness is a formal property but that has nothing to do with whether a programming language is general purpose or domain specific. I would argue that a Turing incomplete language is not a programming language at all.

That being said, programming languages tend to be used within domains even if they are general purpose. That is also true of Swift. Although I personally like Swift I think that its best feature is that it is not Obj-C. I would be surprised if it has much of a future outside of Apple-related products. However, I do applaud Apple for making it open-source and for using a public issue tracker.
 
Swift, along with PHP, Java, JavaScript, Obj-C, C#, etc. are general purpose languages.

A major difference is in the typical implementations. Swift and C compile down to machine code without the need for an external non-realtime run-time. That means you can write OS and driver code in them. Interpreters usually need an OS to run on top of, so can't be used for the bottom layer (except for really simple ones, like Forth). Garbage collectors also need to run on top of an OS kernel, so languages that require GC can't fully be used for the OS kernel. Subsets of C++ might be usable. And of course, one always needs a bit of assembly language to access any non-memory-mapped CPU registers (TLB setup, interrupt vectors and state, performance counters and timers, etc.). Thus a language that can easily interface to assembly is needed to make it completely usable for everything (on real hardware, and not just on a Simulator or VM).
 
A major difference is in the typical implementations. Swift and C compile down to machine code without the need for an external non-realtime run-time. That means you can write OS and driver code in them. Interpreters usually need an OS to run on top of, so can't be used for the bottom layer (except for really simple ones, like Forth). Garbage collectors also need to run on top of an OS kernel, so languages that require GC can't fully be used for the OS kernel. Subsets of C++ might be usable. And of course, one always needs a bit of assembly language to access any non-memory-mapped CPU registers (TLB setup, interrupt vectors and state, performance counters and timers, etc.). Thus a language that can easily interface to assembly is needed to make it completely usable for everything (on real hardware, and not just on a Simulator or VM).

You could say the same for Obj-C, and yet it isn't really used for that purpose, AFAIK.
 
You could say the same for Obj-C, and yet it isn't really used for that purpose, AFAIK.

(1) That might be one of the many reasons why Swift was created, to avoid the need for the Obj-C runtime for OOP code.
And (2) since Obj-C is a strict superset of C, you could always drop down to C and not need any runtime.
 
(1) That might be one of the many reasons why Swift was created, to avoid the need for the Obj-C runtime for OOP code.

And yet Swift makes use of the Obj-C runtime.

And (2) since Obj-C is a strict superset of C, you could always drop down to C and not need any runtime.

And yet Obj-C is not used for OS or driver programming - not even by Apple.
 
And yet Swift makes use of the Obj-C runtime.

And yet Obj-C is not used for OS or driver programming - not even by Apple.
When you see a big outfit promote a "new technology" it is amazing how many of them refuse to eat their own dog food.

Love it or hate it, the C programming language with the C99 embedded keywords has been the rock solid foundation base of most products with object oriented abstraction such as C++, C#, Objective-C, JVM and even Swift are based of the original K&R compiler written now over forty years ago.

Heard is best this way:
When visual programming fails, go back to text objective programming.
When objective programming fails, go back to procedural programming.
When procedural programming fails, go back to assembly programming.
When assembly programming fails, bring out the soldering iron.

Did Taylor Swift write a letter to Apple?
If she did, it would not make any difference. Stage names are a totally separate trademark category from programming languages. Look up the USPTO web site for a full description of different trademark categories.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.