Live data from Hacker News

Apple is rewriting Foundation in Swift

github.com

31–40 of 263 posts

Re: Apple is rewriting Foundation in Swift

#32
post #27

Earlier quoted context omitted.

They both compile slowly because they have similarly complicated type systems. What do you use in Rust that Swift doesn’t yet provide?

Catch data races at compile time?

I don’t know much about Rust, but Swift can prevent data races at compile time by using the Actor type.

Re: Apple is rewriting Foundation in Swift

#34
post #11

Earlier quoted context omitted.

[flagged]

I mean a realistic version of that comment is that you can use GTP* to make a set of unit tests. Then iteratively write a new version in swift to be bug compliant with the old version using GPT*. Then profit? The question really is why is swift objc bridge so bad you need this software?

>The question really is why is swift objc bridge so bad you need this software?

HUH? I don't even understand the question. A bridge is something redundant in itself. It doesn't have to be "so bad" to want to get rid of.

Why keep going through a bridge when you could (after this effort) call the lib directly?

And why maintain the same code in 2 different languages, an increasingly deprecated one, and your new one?

Re: Apple is rewriting Foundation in Swift

#36
post #2

Considering Swift 1.0 was released in September 2014 I'm not exactly bowled over by how long it's taken Apple, with all their resources, to rewrite Foundation.

Well one can find lot of examples in programing language world. e.g. Go's generic implementation, Java's value type implementation etc where things can take really long time to get implemented. It takes delicate confluence of factors like community interest, technical/financial resources and implementers agreement on desired approach to get a feature done.

And all the money in world can't make it any faster.

Re: Apple is rewriting Foundation in Swift

#38

Well, this is one more step toward a fully Swift-only platform. Very soon it will not be possible to publish an app on iOS not built with the house language. For those who don’t know, using C/C++ and opengl was easily done on iOS for many years, as llvm/clang was the official compiler.

Bad take. Swift heavily relies on LLVM. As long as you have LLVM IR, your support isn’t going anywhere. Not to mention Apple continues to be an outsized contributor to LLVM and clang (largely because they started and open sourced the projects)

Apple funds LLVM, but it didn't start LLVM.

"The LLVM project started in 2000 at the University of Illinois at Urbana–Champaign, under the direction of Vikram Adve and Chris Lattner. LLVM was originally developed as a research infrastructure to investigate dynamic compilation techniques for static and dynamic programming languages. LLVM was released under the University of Illinois/NCSA Open Source License,[3] a permissive free software licence. In 2005, Apple Inc. hired Lattner and formed a team to work on the LLVM system for various uses within Apple's development systems."

https://en.wikipedia.org/wiki/LLVM

Re: Apple is rewriting Foundation in Swift

#39
post #11

Earlier quoted context omitted.

[flagged]

I mean a realistic version of that comment is that you can use GTP* to make a set of unit tests. Then iteratively write a new version in swift to be bug compliant with the old version using GPT*. Then profit? The question really is why is swift objc bridge so bad you need this software?

> The question really is why is swift objc bridge so bad you need this software?

Do you want to keep using a UTF-16 backed String type while the world (including Swift) is on UTF-8? (Oh, and I am posing the question to Java too...)

Re: Apple is rewriting Foundation in Swift

#40
post #29

[flagged]

What a weird usage of that word…

GP was probably looking for the word "astroturfing":

astroturfing:

> The disguising of an orchestrated campaign as a "grass-roots" event – i.e., a spontaneous upwelling of public opinion.

https://en.wiktionary.org/wiki/astroturfing

agitprop:

> Political propaganda disseminated through art, drama, literature, etc., especially communist propaganda; (specifically, communism, historical) such propaganda formerly disseminated by the Department for Agitation and Propaganda of the Central Committee of the Communist Party of the Soviet Union.

https://en.wiktionary.org/wiki/agitprop

Post reply on HN