Comment by zepto

5 years ago

It seems unlikely that they’ll solve the problems in iOS with Rust.

It seems much more likely that they will use Swift in some form.

Swift seems an unlikely choice for incrementally replacing portions of kernel code.

  • Apple clearly states Swift is a systems programming language.

    > Swift is a successor to both the C and Objective-C languages.

    https://developer.apple.com/swift

    > Swift is intended as a replacement for C-based languages (C, C++, and Objective-C).

    https://swift.org/about/

    • There are systems languages and then there are systems languages. As the Golang team have pointed out, there's lots of systems programming going on outside of OS kernels. Neither of those links mention kernel development. Pervasive refcount updates (ARC) and a vtable-unfriendly dynamic dispatch mechanism inherited from Objective-C are fine for userspace, but most kernel code is very performance-sensitive.

      5 replies →

  • In its current form perhaps this is true. However Chris Lattner and others have expressed the desire to have it be suitable for systems programming.

    There is reason to believe they will adapt it.

    • Has Chris specifically mentioned OS kernel programming? As the Golang team have pointed out, there's lots of systems programming going on in userspace, which is what they refer to when they call Golang a systems programming language.

      That being said, ARC is probably easier to get to work well in-kernel vs. tracing garbage collection. There's a performance cost to all of those reference count updates, but at least the variance is extremely low.