|Posted by Paulo Pinto|
in reply to forkit
Posted in reply to forkit
On Tuesday, 17 May 2022 at 01:03:14 UTC, forkit wrote:
> On Sunday, 15 May 2022 at 23:11:28 UTC, max haughton wrote:
>> On Sunday, 15 May 2022 at 18:47:22 UTC, IGotD- wrote:
>>> On Sunday, 15 May 2022 at 06:18:58 UTC, forkit wrote:
>>>> Also, operating systems of the (near) future will require safety guarantees from the software that is intended to run on that operating system. C is not a language that facilitates this.
>>> Um, no that will not happen, ever. The safety guarantee of modern operating systems is and will be the MMU. Relying on "safe" software will never be enough. There have been attempts using safe intermediary languages like Microsoft Singularity but don't expect this ever to be a commercial operating system. The MMU is here to stay.
>> I don't think the choice of language is going to make much difference but I'd be surprised if Apple don't do something along these lines in the future. They already scan and analyse applications relatively aggressive for mobile and to an extent for MacOS too.
> The choice of language can eliminate a whole class of bugs.
> It can also ensure the likelihood of a whole class of bugs.
> I'm sure you know this of course. I'm just stating the obvious.
> Fortunately, many get this, and are actively researching ways to move away from C - e.g. https://github.com/tock/tock/blob/master/doc/Design.md
> If Apple is not already doing very extensive research in this area, I'd be ...rather shocked.
That is what Swift is all about,
> Swift is intended as a replacement for C-based languages (C, C++, and Objective-C).
Taken from https://www.swift.org/about/
> Swift is a successor to both the C and Objective-C languages.
Taken from https://developer.apple.com/swift/#fast
And some C improvements as well, thanks hardware memory tagging support
> In iOS 14 and iPadOS 14, Apple modified the C compiler toolchain used to build the iBoot bootloader to improve its security. The modified toolchain implements code designed to prevent memory- and type-safety issues that are typically encountered in C programs.
Taken from https://support.apple.com/guide/security/memory-safe-iboot-implementation-sec30d8d9ec1/web