Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
If it's a hobby, then start with Swift. Like others have said the language choice is meaningless. All of the difficulty is learning the SDK. You can learn either language in 2 weeks. That said, nobody will take a Swift only professional developer seriously. The platform involves 2 languages and will for years to come. Objective C is actually pretty easy. I don't get the fuss. So many language wusses running around. Code is code.
 
  • Like
Reactions: albebaubles
I'm quite new to coding (~1 week) but I think I'm making good progress on Python. When I get a new Mac later in the year I want to immediately get into iOS/OS X programming as a hobby - to create useful or entertaining apps. I understand that Swift is different to the C variants but maintains compatibility.

Swift all the way!
Swift (at least for iOS) offers device-specific integrations, such as Touch ID and 3D Touch. As Amazing Iceman said, "The good news is that as Swift evolves, Xcode Development is becoming less and less dependable of Objective-C."
 
Last edited by a moderator:
I disagree with folks who say you can lean a new language very quickly after your first. Less time, yes, but as a manager of engineers and a programmer myself, I'm sick of people saying, "it's just another language" and then creating monsterously hacky code. To answer the question, Swift.
 
A couple of years down the line & you could probably start with Swift, but I think its still maturing (there's a few incompatible changes in the pipeline).

Having tried to learn somethings while everything was changing, and little or no documentation was available, I would heartily second this advice...stick with Python, really *learn* it and programming principles, and then branch out...really learning one language well is probably better than being somewhat familiar with 3, but not fluent in any one.
 
Learn Swift

(Based on your options of programming languages)

It's new, it's easy, Linux and Mac support it, and Google may soon support it.

It has some nice optimizations and the code isn't too confusing for basic programs or playgrounds to learn in.

After you have thoroughly learned Swift you will have covered enough Obj-C that if you decided to use Obj-C later for some reason it wouldn't be as hard as just starting out with it.

All I've got to say is exercise those fingers because Apple likes to use reallySuperDuperLongDescriptiveMethodNames(), but the fact that Swift code is self-documenting makes it pretty easy to grasp.

C# is pretty easy to learn and python is really easy but if you have no interest in the language it will be harder to learn vs. learning a language you want to learn.

Also note: The hardest programming language you will ever learn as a beginner is your second language because after you learn the first language you have all these preconceived ideas about why and how everything works. This is why I don't suggest learning Python first.
 
I'm actually kicking around the idea of picking up Swift. I already downloaded the free ibook from apple on learning swift.

I haven't really programmed in years and I'm wanting to do some small projects.
 
Swift all the way!
Swift (at least for iOS) offers device-specific integrations, such as Touch ID and 3D Touch. As Amazing Iceman said, "The good news is that as Swift evolves, Xcode Development is becoming less and less dependable of Objective-C."
You're talking out your ass.
 
I'm actually kicking around the idea of picking up Swift. I already downloaded the free ibook from apple on learning swift.

I haven't really programmed in years and I'm wanting to do some small projects.
What type of "small projects" did you have in mind?

Swift can be used for almost anything but it clearly favours projects with a large team of developers working for years on a single chunk of code.

For example, if you want to read a file you're forced to handle the remote possibility of a user unplugging the USB hard drive at the exact moment you're reading the files. Other languages, like Objective-C, allow you to assume this would never happen but not swift. And if you want to divide 4.2 by 7 that will be a syntax error, since 4.2 is a double and 7 is an integer. Swift forces you to make sure both are the same type before dividing, again to avoid edge case bugs that are extremely rare.

For simple projects where you just want it to work, stick to less strict languages like PHP or even Objective-C. Swift is a language for people who want to make a career out of programming. Swift is, however, a great language for beginners, since it forces you to learn good habits early, making you a good programmer in any language.
 
Just try it out. I found that focussing on one language alone to learn programming is not the best way to do it. You need exposure to different ideas and fields of application to really understand why Python does the things it does and Swift is how it is. Shared programming concepts, such as object-oriented programming, will only become clearer along the way. Most importantly, since you are doing this as a hobby, is exposure to practice. Learning programming can be very tedious and frustrating and I found it manageable when you can actually see results and achieve something tangible.

I can recommend the introductory courses at Udacity.com (they are free). They have two great beginner's courses on Swift and iOS application development with Swift, where they go through the language, programming basics and lots of Xcode-related and SDK stuff to create a simple app for you to work on. They offer intermediate courses too, going into common interface components (buttons, tables, segues), networking and persistent storage (including Core Data) on iOS. These five courses can really give you a headstart into the language and iOS development specifically. I also found them great for other development-related stuff, like learning Git.
 
"Swift is a language for people who want to make a career out of programming"

That's the strangest and most silly comment I've read here. OC has been used by pros for a very long time. In fact C has been a professional standard for decades. Swift is a newer and less structured syntax but has very good type checking built into it, but writing it is for pros? Come on now, you must be new at this coding thing because no one would write such a thing.

Ps. If you're going to code for iOS and OS X use either Swift or OC and learn the ins and outs of Xcode, especially how to Storyboard.
 
Swift is definitely the future, and it's a fun language because it's so powerful and elegant, but Objective-C has more life in it than people think. My advice -- just do whatever seems existing and interesting to you. The rest always seems to take care of itself.
 
For simple projects where you just want it to work, stick to less strict languages like PHP or even Objective-C. Swift is a language for people who want to make a career out of programming. Swift is, however, a great language for beginners, since it forces you to learn good habits early, making you a good programmer in any language
Perhaps, and its been a while since I programed, but I have experience in many computer languages, including (but not limited to) C, C++, Assembly (for 8086 and the old Dec PDP computers).

I think I can handle Swifts strict enforcement of data types :)

Swift is a language for people who want to make a career out of programming.
Can you expound upon that. Computer languages are agnostic when it comes to people learning it, AFAIK. Why would Swift be better for paid developers then hobbyists?
 
  • Like
Reactions: jaduff46
Also note: The hardest programming language you will ever learn as a beginner is your second language because after you learn the first language you have all these preconceived ideas about why and how everything works.

Sounds like a good argument for starting a second language as soon as you think you have the first one cracked.

Computer languages are agnostic when it comes to people learning it, AFAIK.

I agree that the statement by the original poster was somewhat sweeping and unsubstantiated - however, having recently had a "first play" with Swift, I did get the impression that it put a lot of emphasis on code robustness, and that under that cuddly "JavaScript-with-proper-classes/Python-with-proper-block-delimiters" lies a bit of a bondage-and-discipline language. Apart from strict typing, "optionals" are going to take a lot of headspace. The standard library has a bit of a "serious callers only" feel to it, too. Its not about "paid vs. hobbyist": serious hobbyists can afford to be far more picky about coding standards than the average paid professional, but if you're dabbling for enjoyment you might not see the value in some of Swift's strengths.

However, its a bit early to say if Swift will ever be useful outside of iOS/OS X development. Things are looking hopeful, with the open source Linux version in development, and Google pondering adopting it for Android, but I wouldn't take those to the bank just yet.
 
I haven't really programmed in years and I'm wanting to do some small projects.
Mike - It's difficult to answer without knowing your skills and how much effort you're willing to make to succeed ( and clearly this depends on how you personally define "success" ). All my OS X programming is Objective-C/C and I've found it very capable for both small and large projects for the last 10 years+. Moreover, Objective-C itself isn't difficult IMO; most of my time was spent finding the correct Foundation framework calls to use. Of course, I've been a developer since the mid-70's, so learning a new language is enjoyable and feels natural. Swift has some big advantages but right now ( at least for me ) there isn't any advantage switching to it. In fact, it would basically involve a lot of work to upgrade my current code for no meaningful ( financial or otherwise ) gain. Using Swift still requires the developer to know Foundation and other Apple frameworks. If you haven't used Xcode that can be a little bit of a learning curve and that probably loses a lot of hobbyists that want something simple. There are other simpler alternatives but have to run off now or I'd list a few.
 
I'm actually kicking around the idea of picking up Swift. I already downloaded the free ibook from apple on learning swift.

I haven't really programmed in years and I'm wanting to do some small projects.

I'm in a similar situation. I wrote software for a living for a decade or so, mostly Fortran and DEC Macro-11.

I took a stab at Obj-C but got too busy to finish. I just finished the Swift iBook and really liked that. The writing is very nice. The playground in Xcode makes it easy to try things out, get it wrong and then figure out the right way.

Coming from really simple languages like Assembly, Fortran and some others the hardest thing about learning a modern language like Swift is how much the language is helping you in the background. It is amazing how Swift will intuit what is going on and let you write just the important stuff. I'm used to having to be very explicit about every little detail.
 
Last edited:
  • Like
Reactions: Amazing Iceman
Now that you have seen a cacophony of diverging and converging opinions, I'm sure you are sure of the direction you are going to take. : ) Different experiences breed different opinions. I don't like to change languages if I don't have to. I started out with the UCSD p-System Pascal in college using an IBM TERAK machine, took a one semester FORTRAN class for engineering which used physical cards and batch printouts. FORTRAN and card reader debugging sucked and vowed never to do that again. Then I learned Apple BASIC on an Apple II. BASIC was not good for structured programming so I was happy when the UCSD p-system Pascal was available for it. However, I was not so happy with trying to swap 5 1/4 floppies in and out all the time when the TERAK had 8 inch floppies. Then Turbo Pascal came out which was very nice. The real milestone was seeing the 128 K Macintosh which made sense and computer designers who "got it." To add icing to the cake, one of the first Mac applications was Macintosh Pascal which in my opinion was the best programming environment for the next 20+ years. However, Jobs and Apple made a terrible mistake (haha) and decided to go with NextSTEP and a weird version of the C programming language called Objective C. In the meantime, I learned C for some embedded VME stuff had a nice affair with LISP and Prolog and OPs5 and CLIPS, then got tired of programming for a long time until someone resurrected the old Mac Pascal IDE to run on fairly modern Macs under Carbon. However, this was short lived and I migrated to FPC which is an open source version of the old (and current) Turbo Pascal. However, this was not optimal since all Apple's development interfaces was Objective-C and it was difficult having to do extra work to get things working. Then I decided to survey languages which were cross platform and decided to concentrate more on Python. It was not more than two months into this that Apple came out with Swift that I immediately ceased everything else and went Swift all the way. Since I had the advantage of not having to earn a living programming, I was able to take my time and learn Swift, not be too adversely affected by all the language changes, and also start really learning Apple's API's.

If you are going to concentrate on Mac development, drop Python and go Swift.
If you are new to programming and don't have to make a living coding, forget Objective-C and go Swift.
If you want to hack (nothing wrong with hacking) and/or make small programs for yourself learn Swift and the minimum API's for iOS or Mac OS.
If you are looking for a Mac Dev job, you must know Objective-C and the Mac API's. However, my guess is that the most fun and successful companies will want you to know Swift.
If you like Windows and that realm, I don't have any opinions!.

If you want to be a professional developer working with teams, you will want to know a lot of concepts, most are platform and language agnostic. I would say about 2 person years of tutorials and experience with multiple languages and platforms.

Object Oriented design patterns
Object Oriented Design
Agile Methodologies in general
Test Driven Development
JSON
SQL (and other) databases
<< I'm sure others can add a few more core knowledge skills >>

If you have gotten this far and have picked Swift as your language of choice, you will be glad to know that there is a plethora of books, written Tutorials and Video Tutorials on Swift and iOS software development as well as general software development skills. In fact there are too many tutorials and many of them are not so good and can even be confusing. To short circuit all the trial and error (which I have done already) go and get 1 month trial memberships to Lynda.com, Pluralsight.com and RayWenderlich.com. Don't get them at the same time but rather start Pluralsight after Lynda, etc. because you will not be able to get through all the tutorials in one month. In particular, view at least one tutorial by Simon Allardice on Swift or general programming. Very likely you will not mind paying for a paid subscription rather than wasting your time with You-Tube tutorials.

Even though I am 100% pro Swift and Swift syntax looks fairly simple, Swift is actually a very complex language once you get into it. You can learn to code simple things in playgrounds and make useful apps, but Swift is meant to be a production language and Apple needs to maintain compatibility with old API's while looking forward to doing new things with the language. It is also a language in flux at the moment. Version 3.0 will make some fairly major changes and it probably won't be finally stable until the 4.0 version. Even so, the core language is pretty stable and usually the changes Apple makes are well thought out and useful - i.e. fixing shortcomings.

Finally, I am wagering in 5 years Swift will be in the top 10 if not the top 5 languages in use especially now that it is open source.
 
I still say, stick with Python until you feel reasonably capable with it. It's far more versatile for almost everything except making App store apps. Examples, not only some new kids fun learning material, but many of the new deep neural machine learning tutorials use Python. It will be awhile before a beginner can play with that that range of stuff as easily in Swift. Same with server coding and command-line scripts and problem solving quickies.

Them move to Swift after you get competent, but before you start getting too tricky or complicated with your Python code. Or when you have an app to develop, and already have a good idea of how to break down the idea, or want to play with spiffy iOS UI.
 
Don't know where you're getting that. I do this literally all the time. If you have Xcode, you have standard command line build tools available, so you should be able to do all you need to do from a terminal. Whether you prefer to or not is a different story.

Have to agree. Node.js for example is precisely that simple running from the Terminal on OS X. Simple desktop apps can be up and running in no time from the command line with Node or similar frameworks.

I'm quite new to coding (~1 week) but I think I'm making good progress on Python. When I get a new Mac later in the year I want to immediately get into iOS/OS X programming as a hobby - to create useful or entertaining apps. I understand that Swift is different to the C variants but maintains compatibility.

My question is, as someone with no prior experience in either, would it be better for me to learn Objective-C before Swift or vice versa?

Swift should be your focus, but realize that Apple has not yet rewritten their higher level frameworks (Cocoa, Cocoa Touch, etc.) in Swift. You need to have some basic understanding of Objective-C to know how these frameworks are used. And if you really want to get serious about iOS and OS X development, eventually you will need to learn about Core Animation, Auto Layout, pointers, Grand Central Dispatch, and Core Foundation (which requires working knowledge of the C language).
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.