Most active commenters
  • cosmic_cheese(3)
  • pmarreck(3)
  • pjmlp(3)

←back to thread

612 points dayanruben | 40 comments | | HN request time: 0.003s | source | bottom
Show context
uhura ◴[] No.42901158[source]
I believe that this long game of Swift being "good for everything" but "better for Apple platforms" will be detrimental to the language. This does not help the language nor seems to bring more people to the ecosystem.

Competitors seems to have a combination of: - Being more open-source - Have more contributors - Have a narrower scope

Maybe they should consider open sourcing all the tooling (like Xcode) otherwise the gap will only grow over time when compared to other languages.

replies(10): >>42901489 #>>42901515 #>>42901558 #>>42902281 #>>42902484 #>>42903459 #>>42903586 #>>42903797 #>>42905687 #>>42906498 #
1. JTyQZSnP3cQGa8B ◴[] No.42901558[source]
This has been my experience for a long time. Swift is nice but why would I waste my time working on a language that is too tied to the Apple platform even if it's open-source when we have more universal scripting languages like Python, or languages like Kotlin that are compiled but have more support (because I trust JetBrains way more than Apple at the moment), or languages that are most strict like Rust but have more momentum and safety?

They painted themselves in a corner. Apple being the best computing platform while trying to please everyone can never be a serious proposition. Either they are the best and everyone uses macOS, or we have to be so careful that any alternative is more interesting that what they propose.

replies(7): >>42901756 #>>42901778 #>>42902195 #>>42902203 #>>42902864 #>>42905718 #>>42907045 #
2. thih9 ◴[] No.42901756[source]
> why would I waste my time working on a language that is too tied to the Apple platform

This might work the other way round: starting from people familiar with macos or ios development who want to write for other platforms.

Then the question becomes: why would a developer learn a different open source language when they can use what they already know. And sure, depending on the context they might still go with Python/Kotlin/Rust/etc.

replies(2): >>42903096 #>>42903873 #
3. cosmic_cheese ◴[] No.42901778[source]
Can only speak for myself, but I’d love to be able to use Swift elsewhere so I don’t need to drag around a JVM and all the things that come with it (Kotlin) or have to wrestle with Rust’s sematics and disinclination towards old style imperative desktop UI development. Swift isn't perfect of course, but it’s the closest I’ve come to a language feeling “comfy”.
replies(3): >>42903117 #>>42906669 #>>42927160 #
4. wahnfrieden ◴[] No.42902195[source]
See https://skip.tools for a new entrant
5. kelnos ◴[] No.42902203[source]
> Either they are the best and everyone uses macOS

"Best" obviously means different things to different people, but at least by market share, macOS has never been the best. Modern Apple doesn't seem to care about market share outside of the iPhone (and even then, they are still more interested in the iPhone being a premium product than winning on market share).

I used to like macOS, 15-20 years ago, but now it's just power-user-hostile and considerably more locked down and buggy. That's not the way to be "best", by any metric I can think of.

replies(2): >>42902698 #>>42902717 #
6. philistine ◴[] No.42902698[source]
> but now it's just power-user-hostile and considerably more locked down and buggy.

Sure, macOS has continued to secure more and more elements of the OS. They have taken a different approach than Windows and Linux, which both keep large swaths of the OS woefully insecure from third-party apps for legacy reasons. But for each and every new lock, there is a key. An incredibly secure OS that gives you the power to control what third-party apps access on your computer is the best power-user feature.

replies(2): >>42902955 #>>42903957 #
7. virgil_disgr4ce ◴[] No.42902717[source]
> now it's just power-user-hostile and considerably more locked down and buggy

Hm, I've been using macOS (alongside others) for the past 20 years straight. In what ways is it hostile and buggy?

replies(1): >>42905740 #
8. GeekyBear ◴[] No.42902864[source]
> languages that are most strict like Rust but have more momentum and safety?

Like Rust, Swift is a compiled language that offers memory safety by default.

The creator of Clang and LLVM also created Swift, and interoperability with C was an explicit design goal.

So Swift offers the memory safety and data race safety of Rust, in a compiled language, without giving up tight integration with C.

(To be fair, better C integration is something the Rust community is looking to add.)

replies(2): >>42903601 #>>42905359 #
9. YmiYugy ◴[] No.42902955{3}[source]
Mac OS does some amazing things for security. An immutable root OS, sandboxing, very user friendly disk encryption. But there are certainly decisions that hold back the platform. Their business decisions have driven most developers away from the App Store. There is a notarization process, but it imposes a burden that many small open source projects can not bear. They don't have an easy way to run untrusted software in a containerized way (compare Fedora toolbox). Installing things globally via homebrew or a random install script is still the way to go.
replies(1): >>42903428 #
10. hu3 ◴[] No.42903096[source]
> people familiar with macos or ios development who want to write for other platforms.

This is a rather small userbase when it comes to enterprise.

Especially because Swift will never be as versatile as Python or as efficient as Rust.

And then there's also Go, C# and Kotlin with much better tooling.

replies(2): >>42903527 #>>42906666 #
11. desiderantes ◴[] No.42903117[source]
So you haven't heard of Kotlin Multiplatform.
replies(3): >>42903541 #>>42903658 #>>42910372 #
12. philistine ◴[] No.42903428{4}[source]
> Their business decisions have driven most developers away from the App Store.

> They don't have an easy way to run untrusted software in a containerized way (compare Fedora toolbox).

The App Store is the way to run untrusted apps in a containerized way.

replies(2): >>42903699 #>>42905715 #
13. privacyis1mp ◴[] No.42903527{3}[source]
Xcode gives me such a hard time that I started considering writing in Kotlin for macOS, just to have a normal IDE. We used to have AppCode (from JetBrains) and it was great. I wonder why Apple didn't support JetBrains, after all, it would have been to Apple's benefit.
replies(2): >>42905182 #>>42905358 #
14. privacyis1mp ◴[] No.42903541{3}[source]
What are your experiences of using Kotlin for modern macOS/iOS development? How's the support looking when Apple releases new XCode?
replies(1): >>42907158 #
15. myko ◴[] No.42903601[source]
fwiw Swift still doesn't support mixed-language targets so the interop is somewhat less useful to me than I'd like: https://forums.swift.org/t/se-0403-package-manager-mixed-lan...
16. cosmic_cheese ◴[] No.42903658{3}[source]
Have heard of it, haven’t investigated it deeply. Looks to still have some of the less-great points of the Java ecosystem on the build side of things (gradle) which is a detractor for me.

Kotlin’s syntax is also weird/quirky in some ways.

replies(1): >>42904004 #
17. fcantournet ◴[] No.42903699{5}[source]
It's "the way" that apple wanted it to be, but it's not the way that humans have chosen.

Typically not a great idea to be against humans, especially the ones that give you money.

replies(1): >>42905213 #
18. makeitdouble ◴[] No.42903873[source]
That crowd has the disadvantage of not being primarily interested in the other platforms, so they won't be much invested in optimizing or better matching the target capabilities.

That's the same dynamic as web devs writing React Native apps: you won't expect them to contribute extensions that manipulate local apfs metadata for instance.

So while it's nice to have them use the tools, you still need people who primarily care for non Apple platform and embrance swift for their purpose to have it expand.

replies(2): >>42904311 #>>42906657 #
19. makeitdouble ◴[] No.42903957{3}[source]
They're also hitting the classic "strategy tax"

When Apple secured the OS from third party, they also purposefully closed the door on deeper third party integration to privilege their ecosystem.

macOS only being half as useful for Android users makes it harder to be the "best" for that swath of users. iPadOS being the only tablet form in the ecosystem will also distance other users etc. They just can't please everyone while locking them in a limited ecosystem.

20. bartekpacia ◴[] No.42904004{4}[source]
> Kotlin’s syntax is also weird/quirky in some ways.

I'm curious to learn what you mean by this! :)

replies(1): >>42904570 #
21. qaq ◴[] No.42904311{3}[source]
Hmm Snowflake and Apple are rewriting FoundationDB in Swift. Swift has pretty good dev. ergonomics and good interop with C/C++ so it might find it's niche outside of Apple.
22. cosmic_cheese ◴[] No.42904570{5}[source]
No terenary if and the elvis operator, for one. Stuff like that trips me up frequently when jumping between Kotlin and Swift/other C-likes.
replies(2): >>42904698 #>>42905204 #
23. koakuma-chan ◴[] No.42904698{6}[source]
If expression: https://kotlinlang.org/docs/control-flow.html#if-expression Elvis operator: https://kotlinlang.org/docs/null-safety.html#elvis-operator
24. ChrisMarshallNY ◴[] No.42905182{4}[source]
Personally, I never liked AppCode. It was too much like Eclipse (which I also never liked).

Me not liking something, does not make it bad. It’s just not my choice. I’m glad it existed, because it probably prompted Apple to do better with Xcode. Lots of people that I respect, used it.

These days, Xcode is Big Bug Ranch. When “Delete the DerivedData folder” is S. O. P. for developers, and Apple tweaked Xcode to reduce its impact on the project, you know that they have waved a white flag to bugs.

25. bartekpacia ◴[] No.42905204{6}[source]
Ah, I see. Tbh, I actually like the lack of ternary and elvis, they are nicely handled by if expression (as the other comment notes)
26. ChrisMarshallNY ◴[] No.42905213{6}[source]
> especially the ones that give you money

Last time I checked, their market cap was North of $3T, so someone is giving them money…

27. joseda-hg ◴[] No.42905358{4}[source]
There's even history of it working before, with Google / Kotlin
28. marxisttemp ◴[] No.42905359[source]
The creator of Rust also briefly worked on Swift
29. chipotle_coyote ◴[] No.42905715{5}[source]
I think if your app is on the App Store, it's kind of trusted by definition, isn't it?
30. pmarreck ◴[] No.42905718[source]
Python is not compiled, it is interpreted, and it has many warts.

Kotlin depends on the JVM and is also not compiled.

Rust? Now you're talking. Except that it has warts, too.

replies(1): >>42906587 #
31. pmarreck ◴[] No.42905740{3}[source]
Secure Enclave, having to use only signed apps and kernel extensions, stuff like that I imagine.
32. zoot64 ◴[] No.42906587[source]
Kotlin is compiled in the sense that it compiles down to bytecode read by the JVM. It's not machine code level but it is still compiled to a certain degree. And Kotlin can compile natively for multiple targets including macOS and iOS without need for the JVM. There's also WASM support too.
replies(1): >>42913578 #
33. pjmlp ◴[] No.42906657{3}[source]
That crowd needs other platforms when using servers, as Apple has moved itself out of the server market, so at very least BSD/Linux workloads.
34. pjmlp ◴[] No.42906666{3}[source]
Since Apple has moved themselves out of the server market, folks need to at least be able to target BSD/Linux server workloads, and naturally using Swift as well instead of another language is a desired option.
35. pjmlp ◴[] No.42906669[source]
You mean like the huge ecosystem of libraries for almost anything one can thing of, and IDE tooling, with 30 years of experience in production?
36. DidYaWipe ◴[] No.42907045[source]
The Python ecosystem is a sad mess.
37. aalimov_ ◴[] No.42907158{4}[source]
Kotlin Multiplatform (KMP) is neat for android devs that want to be able to code for both platforms using a toolset/language they are familiar with, but for iOS development KMP is a hassle (personal opinion). I’d rather just write the code twice. Also, I actually like Xcode. As for Android Studio, up until the more recent versions the GUI felt really clunky to me (which made working in it a bit of a slog).
38. mdhb ◴[] No.42910372{3}[source]
Or Dart
39. pmarreck ◴[] No.42913578{3}[source]
Did not know about non-JVM compilation. Does it include the JVM as part of the binary then? Links?
40. rnikander ◴[] No.42927160[source]
I was using Swift before. Currently learning Rust. Want to use it for cross-platform UI, and I'm stuggling with exactly what you describe there.