Kotlin and Swift look like rival camps but share one ideology
Postmates runs about 90% Swift on iOS and 70% Kotlin on Android, and some of its engineers ship to both clients. Bianca Curutan, a mobile engineer who joined with zero Android experience and now leads an Android team, walks through side-by-side code to test a claim from her master's research. For any developer stuck on one platform, the question is how far apart these two languages really are.
See the side-by-side examples and learn what knowing both languages does for your mobile career
Bianca Curutan, a mobile engineer at Postmates who works on both iOS and Android, walks through side-by-side code examples to show that Kotlin and Swift follow the same programming paradigm. She argues that both languages solve the same problems left by Java and Objective-C, so learning one makes the other easy and helps mobile teams collaborate across platforms.
“And semantically, they share the same ideology since they solve the same problems created by their ancestor languages.”
“Fortunately, even if you don't know a specific language, from my experience and for exactly what my graduate research was on, the idea is if you know programming concepts, it should be fairly easy to start picking up new languages. In the end, it's mostly just syntax.”
What you will learn
Map core Kotlin constructs such as val, var, optionals, lambdas and interfaces to their Swift equivalents.
Explain why Kotlin and Swift are safer and less verbose than Java and Objective-C while staying interoperable with them.
Plan a move from iOS to Android, or the reverse, by building on the concepts the two languages share.
Weigh native Kotlin against Flutter or React Native based on whether your team comes from web or mobile.
Start learning a mobile language by building a simple app, such as a calculator, from a tutorial.
Details
Level
Beginner
Format
Tech talk
Technical depth
Practitioner
For
Student, Early career, Mid-career
Length
24:43
Published
July 2020
Questions this talk answers
How similar are Kotlin and Swift really?
Syntactically and functionally they are close enough, and semantically they share the same ideology because they solve the same problems created by Java and Objective-C.
What do Kotlin and Swift improve over Java and Objective-C?
They are safer, catching more issues such as unwrapped optionals at compile time, less verbose with less boilerplate, support functional programming, and remain interoperable with their ancestor languages.
Why should a mobile developer learn both languages?
It deepens understanding of development concepts, makes the leap between iOS and Android easier, speeds up native development and testing, and encourages cross-team collaboration and app parity.
What should an aspiring iOS developer learn?
Swift first, since many companies including Postmates expect it in interviews, plus Objective-C because larger companies still use it. Bianca also recommends building your own simple app.
Should I learn Flutter, React Native or Kotlin?
It depends on your background: in Bianca's observation React Native tends to suit web developers, while Kotlin is more common for pure native mobile development.
About this talk
Android and iOS are two very different platforms, but is that also the case for Kotlin and Swift? In this talk, we’ll walk through examples to demonstrate that these two languages, in fact, follow the same programming paradigm. Understanding these similarities can help developers work more collaboratively and efficiently across client teams.
Why Kotlin and Swift beat Java and Objective-C (87 s)
Why learning both mobile languages pays off (57 s)
Failing a first coding class, then not giving up (69 s)
Speaker 1: Hi, everyone. Thank you for patience. I just wanted to give it a few extra minutes in case there were any last minute stragglers coming in. But of course, it's open to people to come in and drop by whenever they'd like. Please let me know if you can't hear me or if you'd like me to slow down. I'll try my best to keep an eye on the chat and answer questions as we go along or feel free to save them to the end. With that being said, let's get started. Well, firstly, I hope you're all doing well and you're staying safe and healthy during this time. My name is Bianca, and this is Kotlin versus Swift, not so different after all. Today, we'll be walking through some examples that demonstrate that these two languages follow
the same programming paradigm. Understanding these differences, especially, can help developers work more collaboratively and efficiently across client teams and provide a higher level understanding of programming concepts in general. Before we jump into that, however, let me tell you a bit about my background. I'm currently a mobile engineer and an Android lead at Postmates in San Francisco, where I develop iOS and Android apps primarily on the Courier Experience team.
If you're not familiar with Postmates, it's an on-demand delivery platform similar to Seamless, Uber Eats, Deliveroo or DoorDash, although we're not just limited to food deliveries. And we at Postmates have mobile apps on all three sides of the marketplace. So that's the buyers or consumers, which may be the app you're most familiar with if you've used our platform before, Fleet, which is the courier experience in the team that I'm on, and the merchants. Fun fact, I was on the team that developed the merchant iOS app for the very first time just a few weeks ago. It was part of our company-wide hackathon.
So building an app from scratch in one to two days, and it's hopefully pending release in the near future. But anyway, the client stacks that we use across the mobile teams at Postmates include Java and Kotlin on Android and Objective-C and Swift on iOS. Prior to Postmates, I used to do iOS and web at Fandango and Flixster Rotten Tomatoes where I worked on the Flixster iPhone and iPad apps and the Rotten Tomatoes review website, which some of you may know for movie and TV reviews. Although I'm currently working in the Bay Area, I'm originally from Canada. I went to the University of Waterloo and McMaster University where I studied math and software engineering, particularly code generation. And one of the things I sought to prove with my master's research was the semantic similarities between any programming languages,
regardless of their different syntax or paradigms. Sound familiar? I hope so. So let's get more technical now. Firstly, what is Kotlin? Kotlin is an open source programming language developed by JetBrains. It runs on the Java virtual machine and is 100% interoperable with Java. What is Swift? It's an open source programming language developed by Apple. It uses the Objective-C runtime library and allows C, Objective-C, C++, and Swift code to run within one program.
But wait, that actually sounds like they're different. And here I am claiming they're actually very similar. So let's check out some examples. First, we'll start with the basics, variables. For variables you set once, constants, we use the keyword val in Kotlin and let in Swift. The constant here is forever 20 with the value 20, and it will stay at 20 unless it's changed using the keyword var. The next example, which actually uses var, is called not always 12, where we start off with the value 12 but then change it to 87 soon after. Simple, right?
What about types? Perhaps the simplest one to understand or that's at least familiar is automatic type inference. In the first example, the variable auto will be determined to be a string type based off the June text. The next example shows implicit type conversion. The variable is declared as a double but is not explicitly initialized as one and the value is 2020.
Of course, if there is implicit type conversion, then there must also be explicit type conversion. Here, we cast the number 19 to be a string. Otherwise, automatic type inference would likely cast it as an int. Finally, Kotlin and Swift allow for optional types, meaning variables can be null or some other non-null value. If you're familiar and/or have used Java before, this would be that nullable annotation.
By non-null in this example here, I'm of course referring to Women Tech Global Conference. String interpolation or variable substitution is a way to inject values into a format string. The variable here is who is it with value Women Tech. Putting it together with greeting, the final result is hello Women Tech. On to collections, lists in particular. Like their ancestral languages, it's possible to initialize lists on the fly in Kotlin and Swift. Here, we're listing out the themes for the conference sessions today.
We have work revolution, tech innovation, and purpose, humanity, and collaboration. Here's another example of a collection, maps. In this example, we're mapping Android OS's specifically to the letters to the names. You may have noticed the mistake here where we accidentally mapped M twice, first to lollipop, and then, correctly, to Marshmallow. But no worries. It's a mutable map and we'll just save the latest corresponding value, like variables do.
Lists and maps are only two examples of collections, of course. Other collections you might want to look at are arrays, sets, and sequences available in both languages. Putting together some of the concepts we've talked about, we can write functions, a group of related statements that perform a specific task. Here, we have a name argument, and we use string interpolation to create a result string. Calling this function, "Hello," yields, "Hello, Jane Doe."
Now, perhaps those examples were a little too simple or boring for you. So, let's take a look at some complicated ones next. Unwrapping non-null optionals. Let's say we have a constant world that has an optional string type. For safety, the compiler only allows us to use world after unwrapping it by using let in Kotlin with the Elvis operator and if let in Swift. And as you can see here, world is not null, so we'll end up with "Hello, world." Just as a side note, if you do try to use it while it is not unwrapped, so it's still in an optional state, for example, if you try to print it, the printer will actually say optional and string, which in most cases, we probably don't want to see that.
So, using the same example from before, we can see how the result changes when we have a null value instead. Now, we'll end up here with nothing to see here, folks. Onto lambdas, which are a way to create small functions without names. So, the lambda I'm referring to here is the braces right after a side stop map.
In this example, map, like I mentioned, is used on a list and applies a cube operation to each value by by multiplying it to it to it. The result is a new list of values where each value of sides is cubed. So, providing list one, two, three to the function will return a list one, eight, twenty seven.
Other lambdas you may want to explore are filter and reduce, both of which can be combined along with map and to each other. So, building on our example from before, does anyone know what the function foo here does? It filters out the list of sides to use only even numbers, where mod two equals zero. Then it essentially cubes those values returning eight, sixty four.
Interfaces in Kotlin can contain declarations of abstract methods, as well as method implementations. Then a class or an object can implement one or more interfaces. Similarly, there are protocols in Swift, which can then be adopted by a class structure or enumeration to provide an actual implementation of those requirements. So, in this Kotlin example, we have my awesome Kotlin class, which implements my awesome interface with function foo.
And next to it, on the Swift side, we similarly have my awesome Swift class implementing my awesome protocol, again with the function foo. Well, that may have been a lot to take in, but there are some useful conclusions that we can draw from these examples. So, first, let's compare Kotlin and Swift to their ancestor languages, Java and Objective-C.
They're safer. Remember that unwrapping example we looked at? We're able to catch and fix more issues in compile time, or if we do decide to find them at runtime, we can hopefully catch those errors like optional string. They're less verbose. They have leaner syntax, making them more convenient and readable, particularly for developers newer to the languages. And this also drastically reduces the amount of boilerplate code.
They both have functional programming support, useful if you're familiar with other functional languages such as Lisp or Haskell. And on top of all that, they're still interoperable with their ancestor languages. So, it's possible to use Java and Kotlin in the same code base, or Objective-C and Swift. And this makes it easier to develop new projects or maintain older ones.
So, fun fact, like I mentioned at Postmates, we do use all four of the languages in our mobile code bases, but they're heavily skewed towards the newer languages. So, for example, we have, I believe, 90% Swift based code and then 10% Objective-C. And then on the Android side, it's about 70% Kotlin and 30% Java. Well, now that we've compared Kotlin and Swift to their ancestral languages, how do they compare to each other? That part is easy.
Syntactically, they're close enough. You can see that in the examples we covered today. Functionally, they're also close enough. And semantically, they share the same ideology since they solve the same problems created by their ancestor languages. So, what does that mean for you? Well, there are benefits to learning and understanding both languages, or at least the ideology that they come from. It can improve your skills and experience, giving you a stronger understanding of development concepts. Based on that, it can also be easier to make the leap from iOS to Android and Android to iOS. It aids in native development, so it becomes faster and easier to develop, test, and maintain both clients. And it encourages cross-team collaboration and app parity.
I mentioned in the beginning that I'm a mobile engineer for both clients, and fortunately, I'm not the only one at the company, since others have also taken advantage of the similarities to be able to work on both platforms. And as a bonus, Swift is not limited only to iOS code, and Kotlin is not only limited to Android. You can build iOS apps using Kotlin on multi-platform, and you can build Android apps using Swift for Android.
So, that's it for today. Here are some resources to help you get started. The slides for this presentation and other talks I've done are available at the WordPress link. And thank you for joining me today. I hope what you learned can be applicable in your daily development lives. I will still be here for questions if you have any. Otherwise, please feel free to reach out to me. Thanks.
Great. Thank you, Amanda, Miriam. I haven't used Flutter before. How do you like it so far? I'm not sure how many languages I know. On a regular basis, I use perhaps three of them. So Java, Kotlin, and Swift. When I was in school, I actually took a programming language class. So this is just for one class where we had to do assignments in 14 different languages. So I guess it depends on your question on what do you, how do you define how do you know a language versus just having used it before? I guess you might want to write more than hello world. Which one do you like most? That's difficult to say. I think I tend to have recency bias. I like Kotlin and Swift because those are the ones I use the most often day to day.
So it's very easy to be able to use without thinking too much about it. But I'm sure as I start to use different languages, I would see the benefits of those as well. Great. Yeah, I have heard really nice things about Flutter. With React Native, I'm not sure if you've ever brought it up with mobile developers, but there always tends to be a big eye roll like, oh no, React Native. Although personally, I haven't used it.
What I find and sometimes I do get asked the question like, why are you learning Kotlin and Swift? Why don't you just build the two apps in React Native? I tend to just, I've had the observation that React Native tends to be used by web developers, whereas mobile developers tend to use native languages. So it depends on the skill set of the engineers, I guess, on what they would prefer.
Which one has taught me the most about logic language and its use? I would say, I think Java, I believe. But yeah, I suppose there's no correct answer to that because everyone has their own experiences. I tend to like Java for learning logic and language because it was the first language that I learned way back when I was in school. But besides that, it's, if you've ever done developer interviews, it tends to be a very common interview language. So it's a lot easier, well, easier. It can be a lot easier to pick up on concepts, but as well as communicate those concepts to other people since a lot of people tend to be familiar with that. Another one that I see, but not, well, it depends on what type of engineer you're talking to, but another language I see a lot of people
using especially for back end is Python. And that one they also tend to teach in a lot of boot camps and in schools. So that seems to be a good one too. Best platform to learn Kotlin. Sorry, can you please clarify that question a little? I'm not quite sure what you mean by the best platform. The way that I've learned Kotlin and if you're interested in mobile development, what seems like a good direction to go is just to build an app using Kotlin. Fortunately, since it's an official Google language now and it has been out for some years, there's a lot of tutorials online and other resources that can help you learn. And I guess again, since it is an official Google language, there do
tend to be more production apps using it now than there used to be. Yes, we do use Android Studio for dev environment. And also Xcode for Swift for iOS. Great. Well, thank you again. Oh, sorry. One last question. I got confused between Flutter and Kotlin. Thank you, Amanda. Flutter and Kotlin. Well, I haven't personally used Flutter before, but it depends what direction you want to go with how you're learning. For pure native mobile development, Kotlin does seem to be more common from what I've observed, but that could also just be the companies and the engineers I'm surrounded with. It might just be my own experience. It would be great if anyone else has other things to mention, but both are used in mobile development. So it just depends on what
direction you want to go and where you want to go from there. Yeah, because what Amanda says is a great way to mention it. It's easy for a web dev to learn. So if you're coming from a web background, then that would be a shorter jump to be able to learn mobile development from there. And then if you want to learn. Or if you come from a background that's neither web nor, oh, sorry, that's just not web, then it seems like they're about even jumps to be able to learn.
What is your education journey? My education journey kind of went all over the place. I actually didn't take my first programming class until university. Oh, sorry, just to add to Kruti, if I'm pronouncing that correctly, please let me know if you have any follow up questions as well. I can be reached at the contact information on the slide. I can also be here.
Okay, so I also plugged my LinkedIn information to the chat if anyone has follow questions after this. But for Jorge, if I'm pronouncing that correctly. So what is your educational journey? Yeah, I didn't know I wanted to be an engineer. I took my first programming class in university. I did not do that great on it. But fortunately, I did not give up. And I decided to take another one. I did a lot better.
And I guess from there, something kind of clicked. It was like, oh, this is actually something that's kind of cool. And I'm actually pretty good at it. And I can get a job out of it. So everything seemed to align really well. And that's when I decided to pursue it a bit more seriously. I ended up finishing my degree in math, because in my head, I had already started it, and I wanted to finish it. But I went back to school to do software engineering. And kind of, for me, that was what I thought was a good personal decision, because it helped me bridge the gap. Math was a good way for me to start, because it introduced me to programming concepts. But I still felt like I was lacking some things that I wanted to
learn more on. So from there, it was fairly linear. After getting my master's in software engineering, I moved to California and got my first development job in web. Then from web, I switched over to iOS development using Objective-C. And yeah, from there, I kind of kept going along the iOS path for a while. And then I learned Android in my current role. So when I first joined my current company, I had zero Android experience. But I learned it. I had really good opportunities and really good mentorship.
And now I'm leading one of the Android teams. So it's kind of cool. You never know where things will take you. So if I want to be an iOS developer, what other languages, tools and software do you recommend learning? Swift is definitely one that I would put high up there. But that really depends on the company. My current company and also at a lot of smaller or medium sized startups or just companies that tend to be less corporate. A lot of apps are built using Swift. Again, using my company as an example, Postmates, we require that you at least learn Swift prior to the interview to be able to pass.
If you give us solutions in Objective-C, we'll say, OK, great, but you're not going to pass. I'm so sorry. But for iOS in general, it's definitely valuable to also know Objective-C because a lot of companies, especially larger ones, still use it. Even my company still uses it for that 10% left with the code base. So it definitely helps to have familiarity. Fortunately, even if you don't know a specific language, from my experience and for exactly what my graduate research was on, the idea is if you know programming concepts, it should be fairly easy to start picking up new languages. In the end, it's mostly just syntax.
So for iOS, yes, definitely would recommend Swift and Objective-C if you want to learn. Sorry, this is assuming native iOS development. If you would like, I would highly encourage you to build your own app as well. I found that was the best way to learn. It doesn't even need to be anything complicated. I believe the first app I built off of a tutorial was a calculator. Like it's a calculator, you know exactly what it's supposed to do. So you don't need to think about oh, what features should it have? Like what does it need to not have? It's a calculator. So yeah. Okay, unfortunately, I think that might be all I have time for today. But thank you all again, please feel free to connect and reach
out if you have any other questions. I'd be happy to connect with you.
Transcribed automatically; names checked against the speaker record. Select a time to jump there.
Article based on this talk
Why learning Kotlin makes Swift easy, and the other way round
Bianca Curutan shows that Android's and iOS's modern languages solve the same problems in almost the same way.
In short
Kotlin and Swift run on two very different platforms, but Bianca Curutan argues that the languages themselves are close cousins. Walking through side-by-side examples, she shows they share syntax, features and, above all, an ideology: both were built to fix the same problems in Java and Objective-C. For mobile developers, that means learning one opens the door to the other.
Key takeaways
Map core Kotlin constructs such as val, var, optionals, lambdas and interfaces to their Swift equivalents.
Explain why Kotlin and Swift are safer and less verbose than Java and Objective-C while staying interoperable with them.
Plan a move from iOS to Android, or the reverse, by building on the concepts the two languages share.
Weigh native Kotlin against Flutter or React Native based on whether your team comes from web or mobile.
Start learning a mobile language by building a simple app, such as a calculator, from a tutorial.
Two languages, one research question
Bianca works as a mobile engineer at Postmates, building iOS and Android apps for the courier experience team, and leads one of the company's Android teams. Before that she worked on iOS and web at Fandango and Flixster/Rotten Tomatoes. Her interest in comparing languages goes back to her master's degree, where she studied code generation.
"And one of the things I sought to prove with my master's research was the semantic similarities between any programming languages," she explains (1:57), adding that this holds "regardless of their different syntax or paradigms" (2:51).
On paper, the two languages look unrelated. Kotlin is an open source language from JetBrains that runs on the Java Virtual Machine and is fully interoperable with Java. Swift is Apple's open source language, built on the Objective-C runtime. Bianca acknowledges the apparent contradiction before setting out to dismantle it with code.
The basics, side by side
The walkthrough starts simple. Constants use val in Kotlin and let in Swift, while var marks values that can change. Both languages offer automatic type inference, implicit and explicit type conversion, optional types that can hold null, and string interpolation. Lists and maps can be initialized on the fly, and functions combine these pieces into reusable blocks.
She then turns to more complex features. Unwrapping optionals uses let with the Elvis operator in Kotlin and if let in Swift, and the compiler forces this step for safety. Lambdas such as map, filter and reduce chain together the same way in both. Kotlin interfaces and Swift protocols play matching roles, letting classes declare and implement shared behavior.
Safer, leaner and still compatible
From the examples, Bianca draws a set of conclusions about how both languages improve on their ancestors. They catch more problems at compile time, they cut boilerplate, and they support functional programming.
"They're less verbose. They have leaner syntax, making them more convenient and readable, particularly for developers newer to the languages." (10:14)
Crucially, they remain interoperable with Java and Objective-C, so teams can mix old and new code. As the speaker cited, Postmates' iOS code base is roughly 90% Swift and 10% Objective-C, while Android is about 70% Kotlin and 30% Java.
Comparing the two modern languages to each other, she keeps it short: "Syntactically, they're close enough. You can see that in the examples we covered today." (11:44) Her deeper point is about intent: "And semantically, they share the same ideology since they solve the same problems created by their ancestor languages." (11:44)
What it means for your career
Bianca lists the practical benefits of understanding both languages: stronger grasp of development concepts, an easier leap between iOS and Android, faster native development and testing, and better cross-team collaboration and app parity. She notes that she is not the only engineer at Postmates working on both clients, and that the boundaries are blurring further with Kotlin Multiplatform for iOS and Swift for Android.
Her own path proves the point. "So when I first joined my current company, I had zero Android experience. But I learned it." (21:14) She credits good opportunities and mentorship, and now leads an Android team.
Her journey into engineering was not a straight line either. She took her first programming class at university and did not do well, but tried again, found it clicked, finished her math degree and went back to study software engineering before moving to California for her first web development job.
Advice from the Q&A
The audience questions ranged from Flutter to education. On cross-platform tools, Bianca observes that React Native tends to be used by web developers while mobile developers favor native languages, so the right choice depends on a team's skills. For aspiring iOS developers she recommends Swift first, since Postmates expects it in interviews, plus Objective-C for the many larger companies that still use it.
Above all, she returns to her research theme: "Fortunately, even if you don't know a specific language, from my experience and for exactly what my graduate research was on, the idea is if you know programming concepts, it should be fairly easy to start picking up new languages. In the end, it's mostly just syntax." (22:56) Her practical tip is to build your own app, starting with something as well defined as a calculator.
Watch the talk
"Kotlin vs. Swift, Not So Different After All" by Bianca Curutan, 25 minutes: https://www.womentech.net/video/bianca-curutan-kotlin-vs-swift-not-so-different-after-all
About the speaker
Bianca Curutan is a Software Engineer at Postmates, where she works as an Android/iOS Engineer, and she earned her B.Math and M.Eng. degrees in Canada with a focus on business systems management and code generation research. Her past experience includes Fandango, Flixster/Rotten Tomatoes and Sun Life Financial, and she particularly enjoys mentoring students, early-career professionals and people newer to tech.
Questions this talk answers
How similar are Kotlin and Swift really?
What do Kotlin and Swift improve over Java and Objective-C?
Why should a mobile developer learn both languages?
What should an aspiring iOS developer learn?
Should I learn Flutter, React Native or Kotlin?
Drafted with AI from the talk transcript. Editor review pending.
Resources mentioned
Speaker's slides (WordPress link shown in the talk)
Android Studio
Xcode
Kotlin Multiplatform
Swift for Android
Online Kotlin tutorials
Cite this talk
Bianca Curutan. "Kotlin vs. Swift, Not So Different After All." WomenTech Network, 2020. https://www.womentech.net/video/bianca-curutan-kotlin-vs-swift-not-so-different-after-all