>_ DevTrendsen

Language

Home

Languages

Sections

Frontend Backend Mobile DevOps AI / ML GameDev Blockchain Security
C-plus-plus

Swift — More Than Just a Language for Apple Development

70,144 stars

Swift logo

Remember when Objective-C was the only choice for developing Apple products? In 2014, the company introduced Swift — a language that was conceived as a safer and more modern alternative. But today Swift has moved far beyond the Apple ecosystem. Let's find out why this project on GitHub with 68k stars is worth your attention, even if you don't develop for iOS.

What does modern Swift surprise you with?

  1. Cross-platform capability — now runs on Linux, Windows, and even WebAssembly

    • Support for Ubuntu, Amazon Linux, Debian, Windows 10
    • Experimental build for Android
    • Compilation to wasm for web applications
  2. Safety as a priority

    • Overflow checking in arithmetic
    • Optional types instead of null pointer exceptions
    • Automatic memory management (ARC)
  3. Compatibility with C and Objective-C

    • Seamless integration with existing libraries
    • Ability to gradually migrate projects

Interestingly, although Swift was inspired by Objective-C, it's a completely independent language, not a superset of C. Here's what a simple example looks like:

func greet(name: String) -> String {
    return "Hello, \(name)!"
}
print(greet(name: "World"))

What's inside the repository?

The main repository contains:

  • Swift compiler (written primarily in C++)
  • Standard library
  • Developer tools (lldb, REPL)
  • SwiftPM package manager support

The build system uses build-script with flexible configuration:

./swift/utils/build-toolchain com.example

It's especially convenient that you can create a local toolchain and connect it in Xcode to test your compiler changes.

Who will benefit from Swift in 2024?

  1. Mobile developers — obvious choice for iOS/macOS
  2. Backend developers — server-side Swift (Vapor, Perfect) is gaining popularity
  3. Systems programmers — low-level capabilities + safety
  4. Cross-platform teams — single codebase for different OSes

How to start contributing?

The Swift community actively welcomes new faces. Before submitting a pull request:

  1. Review the Code of Conduct
  2. Test your changes (there's a detailed guide)
  3. Follow the guidelines

Fun fact: Swift build supports acceleration via distcc and caching via sccache — useful for frequent rebuilds.

Personal experience

In my practice, I've used Swift for algorithm prototyping — thanks to strict typing and modern iteration syntax, iterations are faster than in Python, and memory safety eliminates an entire class of errors. I was particularly impressed by working with multithreading through async/await.

Conclusion: Is it worth trying?

If you:

  • Want a language with a balance of performance and safety
  • Are looking for an alternative to Python for scripting with compilation to native code
  • Plan cross-platform development
  • Dream of influencing the development of a language through open-source

— Swift definitely deserves your attention. Start with the official website, and when you're ready for deep diving — welcome to the GitHub repository!

P.S. Did you know that Swift is in the TOP 20 languages according to the TIOBE index? Not bad for a "young" language!

Related projects