Hacker News new | ask | show | jobs
by stephc_int13 1122 days ago
Well, this is one more step toward a fully Swift-only platform.

Very soon it will not be possible to publish an app on iOS not built with the house language.

For those who don’t know, using C/C++ and opengl was easily done on iOS for many years, as llvm/clang was the official compiler.

3 comments

Happily Swift has interop with C, and they're working on actual C++[1], which would be a lot of wasted effort.

The question is very simple: Swift is meant to be a safe language, how feasible is that if a large chunk of the core types and runtime are implemented in C, C++, and Objective-C/C++? Migrating to Swift is the obvious and sensible step, unless you propose re-implementing them in yet another language?

[1] https://github.com/apple/swift/blob/main/docs/CppInteroperab...

You're going to be relieved when you find out Swift has been using LLVM this entire time.
We’ll see.

I have a bad feeling about this.

Bad take.

Swift heavily relies on LLVM. As long as you have LLVM IR, your support isn’t going anywhere. Not to mention Apple continues to be an outsized contributor to LLVM and clang (largely because they started and open sourced the projects)

Apple funds LLVM, but it didn't start LLVM.

"The LLVM project started in 2000 at the University of Illinois at Urbana–Champaign, under the direction of Vikram Adve and Chris Lattner. LLVM was originally developed as a research infrastructure to investigate dynamic compilation techniques for static and dynamic programming languages. LLVM was released under the University of Illinois/NCSA Open Source License,[3] a permissive free software licence. In 2005, Apple Inc. hired Lattner and formed a team to work on the LLVM system for various uses within Apple's development systems."

https://en.wikipedia.org/wiki/LLVM

Apple hired Chris Lattner straight out of college. LLVM was the subject of his Masters Thesis.

It existed, but certainly wasn't yet ready for prime time. You can watch Chris give a Tech Talk at Google introducing Clang and LLVM and going over the features added in LLVM 2.0 while he was at Apple.

He joined Apple in 2005. and this talk was in 2007.

https://www.youtube.com/watch?v=VeRaLPupGks

Apple only started Clang, llvm already existed - although for a very long time apple was the main contributor (I assume until clang became competitive with gcc no other companies were interested in clang or llvm, and once clang was competitive it meant llvm was able to be a competitive backend as well).