Hacker News new | ask | show | jobs
by pjmlp 431 days ago
Yes, Apple themselves, apparently folks wanting Apple to use Rust don't read Apple's documentation or watch talks done by Apple compiler developers.

> Swift was designed from the outset to be safer than C-based languages, and eliminates entire classes of unsafe code.

-- https://www.swift.org/about/

> Swift is a successor to the C, C++, and Objective-C languages. It includes low-level primitives such as types, flow control, and operators. It also provides object-oriented features such as classes, protocols, and generics.

-- https://developer.apple.com/swift/

"Introducing a Memory-Safe Successor Language in Large C++ Code Bases"

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

"So we feel pretty strongly, obviously at Apple our sucessor language is Swift and I am here to talk about features of Swift, both to try to sell you on to it, but also to talk about the things we think are pretty necessary and the ways in which a programming language can support, you know, clear code, safer and more correct code."

"Like I said before, Apple has always intended for Swift to be a sucessor language for all of our predecessors, from the top to the bottom of our stack, accessible to novices, powerful enough for experts, it is real a tall order.

From https://youtu.be/lgivCGdmFrw?t=1996 to https://youtu.be/lgivCGdmFrw?t=2042

"Swift as C++ Successor in FoundationDB"

https://www.youtube.com/watch?v=ZQc9-seU-5k

1 comments

Oh, you seem to be right.

But isn't Swift lower-performing than C, C++ or Rust?

Not only does Metal use Swift bindings alongside Objective-C, as per John McCall's own words, that is the plan and to fix where that might still not be the case.

Embedded Swift project also started as means to replace Safe C use cases at Apple, like iBoot firmware.

https://support.apple.com/en-jo/guide/security/sec30d8d9ec1/...

https://github.com/swiftlang/swift-evolution/blob/main/visio...

Once upon a time, C compilers were quite lousy versus handwritten 8 and 16 bit Assembly code.