Live data from Hacker News

Apple announces full Swift rewrite of the Foundation framework (2022)

infoq.com

131–140 of 402 posts

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#131

Earlier quoted context omitted.

I think the fact that Rust won't provide inheritance based OOP workflows means that something like swift will always be valuable, especially for application development.

What is the value provided by inheritance? It was my understanding that this was deliberately excluded from Rust as it's now seen as a bit of an anti pattern mostly inferior to traits.

None. It's code organizational syntactic sugar and abstraction that incurs a runtime penalty (vtables).

Go ditched OO for similar reasons.

Haskell, Erlang, and more get along fine without OO.

(OO crested with Smalltalk, Java, Ruby, Python, and JS (more prototypal though). Let's not talk about C++98)

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#132
post #113

Earlier quoted context omitted.

Lots of languages, including Java and Javascript, have been described as being "in the C family", but this papers over a whole lot of important details. Swift is a low-ish-level imperative-ish language with C-ish syntax.

You could just as plausibly say that Swift is a high-ish-level functional-ish language with a modern syntax. Whereas C blows up at runtime, Swift nags-and-whines at compile time - in that way it's very unlike C. All that said "in the C family" is highly ambiguous at best...

When I hear that C family languages are no longer to be utilized, I’m assuming they mean memory unsafe options. C & C++.

Everything else is just as good of an idea as the next. C family is the most successful language paradigm in the history of software. Abandoning those constructs would be suicide. Nothing would get done.

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#133
post #68

Earlier quoted context omitted.

How will that be different from Apple’s Swift toolchain for Windows ( https://www.swift.org/blog/swift-on-windows/ )?

https://youtu.be/bOMQiMxh5Bc?t=430 relevant listen is about 2min long

To me, that sounds as if most of the work would not be on the compiler but on improving the development experience (IDE, debugging support).

On the other hand, your comment said ”working on _a_ Swift compiler for Windows”. To me, that sounded like a new compiler, not adding missing features to the existing one. Which of the two is it?

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#134
post #41

Earlier quoted context omitted.

Yes, and it means Swift scripts and modules that don’t reference UIKit/AppKit/SwiftUI/Combine will run on Linux and possibly Windows with zero or little modification. I‘m a little sad though that they didn’t start this endeavor years ago, because IMO Rust has already built so much momentum that it will win (for the popular, medium to long term definition of „winning“).

Why do you think Swift and Rust are competing on the same grounds or for the same objective? Genuinely curious, i don't know much about Rust.

I used rust for a while. When I saw and read about swift, my immediate thought was: "hey, this looks like rust's easy mode"

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#135
post #112

Correction: rewrite of PARTS of Foundation There already was an open-source project to rewrite ALL of foundation, but it had stalled on the shores of having to re-implement everything: https://github.com/apple/swift-corelibs-foundation The news is actually that Apple is now instead trying to define the bits/parts to support via Swift on all platforms (the original API's will always be supported on Darwin). The announ…

It simply sounds like there isn't much demand for Swift from the Open Source community. Apple certainly makes a big push for it internally, but outside their platform, Swift doesn't have much momentum. If Apple wants people to use Swift like a first-class runtime, they should stop treating third-parties like second-class citizens. They have $200 billion dollars in cold, hard cash - surely some of it could go towards…

The proprietary mobile OS vendor for which you have to use their proprietary desktop OS to build apps isn't popular in the open source crowd? Shocking, really.

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#136
post #41

Earlier quoted context omitted.

Yes, and it means Swift scripts and modules that don’t reference UIKit/AppKit/SwiftUI/Combine will run on Linux and possibly Windows with zero or little modification. I‘m a little sad though that they didn’t start this endeavor years ago, because IMO Rust has already built so much momentum that it will win (for the popular, medium to long term definition of „winning“).

Why do you think Swift and Rust are competing on the same grounds or for the same objective? Genuinely curious, i don't know much about Rust.

Aside from Swift having automatic reference counting, and Rust relying more heavily on its borrow checker, Swift and are super similar languages. If what you want is an ergonomic language that lets you combine the best of ML type systems with C family imperative programming then they’re the two obvious choices.

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#137
post #41

Earlier quoted context omitted.

Yes, and it means Swift scripts and modules that don’t reference UIKit/AppKit/SwiftUI/Combine will run on Linux and possibly Windows with zero or little modification. I‘m a little sad though that they didn’t start this endeavor years ago, because IMO Rust has already built so much momentum that it will win (for the popular, medium to long term definition of „winning“).

Why do you think Swift and Rust are competing on the same grounds or for the same objective? Genuinely curious, i don't know much about Rust.

The segment in this interview where Chris talks about Rust and compares the design decisions they made in Swift tied the two languages closely in my head: https://atp.fm/371

the section on the future hopes for Swift similarly; it seems both Rust and Swift contend to replace C++ in many use cases

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#138
post #135

Earlier quoted context omitted.

It simply sounds like there isn't much demand for Swift from the Open Source community. Apple certainly makes a big push for it internally, but outside their platform, Swift doesn't have much momentum. If Apple wants people to use Swift like a first-class runtime, they should stop treating third-parties like second-class citizens. They have $200 billion dollars in cold, hard cash - surely some of it could go towards…

The proprietary mobile OS vendor for which you have to use their proprietary desktop OS to build apps isn't popular in the open source crowd? Shocking, really.

[deleted]

Re: Apple announces full Swift rewrite of the Foundation framework (2022)

#139

The removal of C from Android and iOS is going to pay off massively. The current state of things where every government is sitting on an endless collection of exploits is not ideal.

Considering that both Google and Apple are cardholding members of PRISM, it sounds like a bit of a frying pan vs fire situation to me.

Yes, but that's OUR surveillance and we're cool with that
Post reply on HN