StackOverflow 2017 survey placed Swift almost at the very top of the most loved language!
Actually — Swift almost took the number one spot in 2016 — Fair play Rust, fair play!
Rust and Swift are both amazing —although both serve a completely different purposes.
After close observation — This fantastic Quora thread reveals the true nature (pun intended) of the intentions behind the Swift naming and logo.
“You want an animal, because, as O’Reilly have conclusively demonstrated, all programmers are closet shamans at heart.”
Great question — Swift is great because it’s very fruitful, rewarding and versatile.
I’ll go into the why and how below.
More common than you think; Oh look! I learned Swift and built a step tracker iOS app — two months later my iOS app hits the Apple Store and becomes a great success! Everyone loves it!
You realize this could be something meaningful — time to build a Mac OS desktop dashboard application!
Oh jolly — I can use my past knowledge and use Swift again!
Fast forward 6 month; Wow! People love the desktop app as well!
I can make a side business of this.
In fact the iOS and desktop app combined became so successful — you no longer rely on any other financial sources other than the two apps you build.
The step tracker reached #1 on the Apple Store — I’m going to continue dominating my niche and adding support for different platforms.
Yep, you guessed it, next up is Apple watch!
Apple watch is the absolute ideal candidate for a step tracker — and it uses the watchOS — Swift is the language of choice for developing watchOS apps.
You could even develop games, tvOS , command line tools and cross platform apps with Swift!
The best way to hire the best engineers is simple — make the engineers happy and keep them happy. Give the engineers challenging, meaningful and exciting work.
Simple function which takes a name and prints it.
let keyword is a constant.
Line 7:we have a traditional function called
printName which takes 1 argument. Before the argument we have underscore
_ — The underscore means we omit the argument label (you can name argument in Swift). The argument is called
name and the type you must pass it is a
String — after closing the parentheses, we have a
-> Void — this lets Swift compiler know which type should the function return. If no type is returned we use the
Void keyword. Void is a special type which explicitly tells the compiler return nothing.
Actually — in fact if we don’t specify a return type, Swift compiler assumes
Void by default — so we can omit the function return type since we’re not returning anything.
Line 12:we call the function with our name;
I might get more technical in another chapter— Would you be interested in a mini-series about Swift? Please tweet (lasnindrek) or mention in the comments.
React Native is great, I’ve build couple mobile apps with RN .
Here’s the catch; when comparing RN to Swift – we tend to forget that Swift isn’t limited to mobile development like RN is.
Both React Native and Swift are great. There is no ‘better’ – pick the right tool for the job.
„I suppose it is tempting, if the only tool you have is a hammer, to treat everything as if it were a nail.“
Thanks for reading! If you found this useful — please give me some claps so more people can see this! ❤
Here are some of my past articles
Let’s Build: Cryptocurrency Native Mobile App With React Native + Redux
Demo — What we will be building medium.com
The secret to being a top developer is building things! Here’s a list of fun apps to build!
You can only become a great developer by putting the effort in. Imagine for a moment — You can’t become fit physically… medium.freecodecamp.org