Live data from Hacker News

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

infoq.com

201–210 of 402 posts

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

#201

Earlier quoted context omitted.

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.

I would not describe Rust as being particularly ergonomic. While it is a suitable replacement for C++, that is not necessarily a high standard to meet.

I have to agree. I find writing Rust painful (probably my fault) and I'm used to writing C & C++.

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

#202

Is there anything genuinely innovative about Swift or is it just another "cross-platform scripting language" that I'll only see on 1 platform? The only reason I learned Powershell is because I have to admin for Windows. At least Powershell is interesting for its pipeline and object handling. I get not one spark of joy from Swift, and the comments I see are "at least we're not writing C anymore". Stockholm syndrome. S…

> Is there anything genuinely innovative about Swift Apple's thing is innovation - taking technology that exists but is clunky and making it accessible. Swift is intended to be a more accessible alternative to Objective-C. It is memory safe (reference counted like Objective-C's ARC but built into the language) and type-safe, and has modern features such as named parameters, generics, duck typing, closures, multiple v…

A good point, and it bears emphasising the subtle but important distinction between innovation and invention. Taking an invented thing and honing it into something that seems obvious in its effortlessness is often especially difficult. But often impossible to see that difficulty in hindsight.

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

#203
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…

I wouldn't trust Apple as far as I could kick them. Not that I think they're evil per se, just that their motivations align with their shareholders, not the dev community. Too capricious by half

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

#204

Good for Apple. In my opinion they are laying the groundwork for reducing technical debt. Objective-C had a good run. I haven’t used Objective-C in over 10 years but I have used Swift about 10% of the time in the last four years. Swift is a nicely designed language and I could see it supporting Apple’s business for many years. Will Swift ever be a primary language on Linux? I would say yes, except now that Rust is us…

I would recommend people always use language like Rust or C++ instead of swift, so that it is easy to make cross-platform apps. The UI can be made using a native toolkit like swift, gtk, winapi, etc... however, the core engine app should be written in a language like Rust.

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

#205

Is there anything genuinely innovative about Swift or is it just another "cross-platform scripting language" that I'll only see on 1 platform? The only reason I learned Powershell is because I have to admin for Windows. At least Powershell is interesting for its pipeline and object handling. I get not one spark of joy from Swift, and the comments I see are "at least we're not writing C anymore". Stockholm syndrome. S…

Swift isn't a scripting language, it's a memory safe compiled language suitable for systems programming in the Obj/C++/Rust/Go category. But unlike Rust, it's a bit more automatic and you don't feel compelled to micro-optimize every memory allocation and RC operation.

…also, the multithreading design is better and more performant.

…also, it has a stable ABI that supports shared libraries, which no other compiled language except C ever manages to get right.

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

#206

Good for Apple. In my opinion they are laying the groundwork for reducing technical debt. Objective-C had a good run. I haven’t used Objective-C in over 10 years but I have used Swift about 10% of the time in the last four years. Swift is a nicely designed language and I could see it supporting Apple’s business for many years. Will Swift ever be a primary language on Linux? I would say yes, except now that Rust is us…

I would recommend people always use language like Rust or C++ instead of swift, so that it is easy to make cross-platform apps. The UI can be made using a native toolkit like swift, gtk, winapi, etc... however, the core engine app should be written in a language like Rust.

Swift just isn't mature enough to know for sure, at least on Linux and Windows. With proper optimization, it might make a case for itself on Linux. That being said, it's going nowhere fast without official support from Apple.

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

#207

Earlier quoted context omitted.

Of course, but so can C++ and Java: https://stackoverflow.com/a/29709521

Implicit main in Swift means you don't need "public static void main..." or other boilerplate. No reason why Java and C++ couldn't do something similar though.

Top level programming is actually a little too surprising in Swift. For instance, you can access variables before they're declared - so you're not just implicitly inside a main function.

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

#208
post #193

Earlier quoted context omitted.

Better just apple than apple + hackers. Not ideal but incremental progress is still progress.

It will never be ideal while Apple's ethics are so soft. Let's help them do the right thing.

[dead]

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

#209

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…

I wouldn't trust Apple as far as I could kick them. Not that I think they're evil per se, just that their motivations align with their shareholders, not the dev community. Too capricious by half

And historically Apple not aligning with developers is a good thing, isn’t it?

There’s a few interesting old videos on YouTube where Steve Jobs is answering developer questions in the audience.

Apple focused on the product and the customer, while Microsoft focused on “developers developers developers.

We don’t need another Microsoft.

We need them both to be different.

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

#210

Similar post by Michael Tsai with some quick summary points of the impact of this: https://mjtsai.com/blog/2022/12/12/the-swifty-future-of-foun...

Not sure why but most people don't seem to have noticed that people outside Apple will now be able to contribute to Foundation and these contributions will ship across all platforms.

Free labor for the world's most profitable corporation.

Looking forward to it.

And then they still take a cut of your revenue.

Post reply on HN