“I’m new to programming — what’s a good language for me to learn?”
So you’ve just joined the world of programming. You got your introductory crash course, learned the basics, and got enough of a taste to know you want to do this. Now there’s just one question: where to start?
If this sounds like you, don’t worry — you’re not alone. Every new programmer has to face this question, and all too often the “right” choice isn’t right for what you want to get out of programming. If you’re new to programming and you want a language that’ll get you fast results, I recommend trying out Apple’s Swift language. Today, I’m going to give you five reasons why I think Swift is great for new programmers. Ready? Let’s get –
Hold on, hold on. Just a quick disclaimer before we start. There’s a lot of fame-and-fortune-related reasons to pursue Swift. Maybe you’re interested in creating the next phenomenon that takes the App store by storm. Maybe you’re interested in following in the footsteps of apps like Getty Images, Yahoo! Weather, or LinkedIn, all of which were created with Swift. Maybe you just want to get in on that sleek, smooth Apple aesthetic.
All of those are all great reasons to learn Swift, but that’s not what I want to talk about. I want to focus on why Swift isn’t just a great language, but a great language for someone who is learning how to code. Here’s five reasons why Swift will be a great fit for your programmer origin story, starting with:
1. Swift Was Designed to Remove Complexity
Created as a (long overdue) replacement for Apple’s Objective C, Swift is a coding language for the people, by the people. Okay, maybe it’s not quite there yet, but it is a system that was made with simplicity and efficiency in mind.
Its syntax was designed to close the gap between the human mind and the computer operations, getting rid of a lot of the moving parts that most other languages need to get off the ground.
Imagine, for instance, that you were coding with something from the C family. Before you could get the code to compile into anything remotely resembling a functional app, you’d need to master everything from functionals to optional chaining. Other languages might have you spend hours working the finer points of headers and compilers, and that’s all before you even feel like you’re getting started. The thing about programming is that you want to build something. So when you’re starting out with programming languages, it’s often a good idea to pick something that you can pick up easily, learn quickly, and build fast.
The thing about programming is that you want to build something. So when you’re starting out with programming languages, it’s often a good idea to pick something that you can pick up easily, learn quickly, and build fast.
2. Fewer Special Characters
If you glance at anything written in Objective-C, Swift’s predecessor, you’re bound to notice one thing all over the place: semicolons. Semicolons at the end of every single line. It’s a veritable flood of semicolons, a plague of semicolons. Just take a look:
That’s the way that many of the older coding languages work. Every line break needs a semicolon, except for the ones that need brackets, or square brackets, or curly brackets or who even knows anymore! And if you miss even a single one? Disaster strikes, and you get to spend the next three hours combing through your code. Swift does away with most of that nonsense, letting you focus on getting the computer to understand what you want it to do. (AKA: the important stuff.)
3. Try It in the Playground First
One of Swift’s greatest “no pressure” innovations is the inclusion of a playground feature to Xcode, the main development tool for the language. Here’s the basic idea: rather than throwing you into the deep end with a full-fledged app, Swift gives you a safe space where you can simulate the apps or programs you’re creating.
This makes an enormous difference in how you can play around with Swift. Go ahead, try out that gut instinct and see if it works. It doesn’t? No sweat, just try another tweak and see if that does the trick. The sandbox model is there to get you working quickly, and to eliminate the ever-present fear of, “Am I about to break everything?” Whether you’re taking the first tentative steps or trying out a hare-brained scheme, the Swift playground’s got your back.
Which leads us to…
4. Swift Gets You (Nearly) Instant Gratification
Think about the last time you were learning a new language. Or mastering a new dish. Or picking up any new skill. Now imagine trying out something new… and then not being able to see if you got it right. Or, even worse, not being sure where in a series of steps you went wrong. Doesn’t sound like a great learning environment, does it?
A lot of programming languages take time to bear fruits, or force you to jump through all sorts of hoops just to get your code to compile.
A lot of programming languages take time to bear fruits, or force you to jump through all sorts of hoops just to get your code to compile. But Swift was built with a sense of immediacy as one of its guiding principles. The playground lets you see what you’re building with just the touch of a button, and, even as a novice, you can put together a simple app in just a matter of days. You get concrete results, see your work in action, and get to hone your skills at a much faster pace.
5. Swift is About to Go Open Source
Earlier this year, Apple made a big announcement: Swift is will soon be made open source. That may sound scary, but it’s actually a really good thing for programmers everywhere. Long story short, it means that the source code for the language will be made public, contributions from the community will be accepted, and the compiler will be available for systems outside of the Apple family. Translation: the language is about to become much more open, much more exciting, and available to a lot more people.
This means that there’s no time like the present to jump on board the Swift train. The community that surrounds the language is about to grow at an exponential rate. There’s about to be many more people coding in Swift, writing about it, teaching it, and more resources dedicated to it! It really is about to become a coding language for the people, by the people, and you want to make sure that you’re there to catch the wave when it does.