Most active commenters
  • easeout(4)
  • fastball(4)

←back to thread

612 points dayanruben | 18 comments | | HN request time: 0.002s | source | bottom
1. aristofun ◴[] No.42905047[source]
Swift itself is a great piece of tech.

But it is doomed to fail as a general widely adopted language unless apple makes few critical moves including open sourcing everything including XCode, providing support for 3d party IDE developers (because xcode is terrible), creating decent package manager, adopting testing as first class citizen etc.

There is just no economical sense for anyone to invest in swift until all the above (and some more) is done.

replies(4): >>42905205 #>>42905304 #>>42905675 #>>42906301 #
2. easeout ◴[] No.42905205[source]
For what it's worth, they ship a solid VS Code extension and LSP. Their swift-testing package is the new open source and cross-platform successor to XCTest. The same can be said of swift-foundation as compared to Foundation.

The path they've chosen is not to open source Xcode, but to move the things Swift needs on all platforms to the Swift language project and common implementations.

Personally I think the main problem with the language, besides Apple's earned poor reputation in FOSS circles, is the compile times. In the source-stable era of the language I'm not sure how they can really be fixed to the degree I'd be happy with.

replies(1): >>42905349 #
3. fastball ◴[] No.42905304[source]
Your wishlist seems midly contradictory. Why does Apple need to open-source XCode if they also provide support for 3rd party IDEs (which they already do, btw)? Also what do you not like about cocoapods for package management?

Plenty of people make an incredible amount of money building apps in Swift, so your last sentence is just wrong.

replies(1): >>42909161 #
4. fastball ◴[] No.42905349[source]
Are there any LLVM langs that have fast compile times? I think that just kinda comes with the territory of having that IR step + all the optimizations that happen at compile time to help runtime performance.
replies(1): >>42905476 #
5. easeout ◴[] No.42905476{3}[source]
That's a good point. I had in mind that there's some regret about the combination of type inference with type-based overloads, due to the search expense it adds to what ought to be straightforward parsing of long expressions.
replies(1): >>42905494 #
6. fastball ◴[] No.42905494{4}[source]
Yeah, I think there are definitely parts of the language design / language features that are going to contribute, but when you need to parse to IR and then compile that to machine code, it seems any features you add that are nice for the developer are going to doubly hurt compile times. You see the same with ARC in swift (or the borrow checker in Rust).
replies(3): >>42905708 #>>42906794 #>>42906977 #
7. isodev ◴[] No.42905675[source]
And make it possible to run binaries on macOS/iOS etc without a mandatory subscription and US export controls. Without notarisation, anything made with Swift is practically unusable on Apple OSs
replies(2): >>42906312 #>>42906820 #
8. Rohansi ◴[] No.42905708{5}[source]
AFAIK those language features are all handled in the frontend before outputting LLVM IR. LLVM optimization, code generation, linking, etc. should all be the same regardless of the source language.
9. frizlab ◴[] No.42906301[source]
It’s written Xcode.
10. frizlab ◴[] No.42906312[source]
Nor with any other language. What’s the point here?
11. easeout ◴[] No.42906794{5}[source]
I don't know about that example—when ARC was added to Objective-C back in the day, I don't remember clang feeling any slower as a result.
12. easeout ◴[] No.42906820[source]
That obstacle and the Swift language are unrelated. The same applies to a Rust app or Electron or anything.
13. saagarjha ◴[] No.42906977{5}[source]
Parsing IR and lowering it is not the reason why compiling Swift is slow.
replies(1): >>42913600 #
14. aristofun ◴[] No.42909161[source]
Decent support for 3d party IDE would mean open sourcing all critical xcode parts that currently leave developers no choice.

Cocoapods is too old and bad for modern era package management. It’s not made for swift also.

replies(2): >>42912212 #>>42912225 #
15. ◴[] No.42912212{3}[source]
16. akmarinov ◴[] No.42912225{3}[source]
Swift Package Manager exists

Cocoapods has been end of life’d

17. fastball ◴[] No.42913600{6}[source]
What is the reason Swift compile times are slow?
replies(1): >>42914192 #
18. saagarjha ◴[] No.42914192{7}[source]
Mostly type checking and name lookup