Live data from Hacker News

Swift 6.3

swift.org

121–130 of 239 posts

Re: Swift 6.3

#121
post #111

Earlier quoted context omitted.

> Swift has remained largely an Apple ecosystem Even today, with the fancy Swift 6.3, the experience of using Swift for anything other than apps for Apple platforms is very painful. There is also the question of trust - I don't think anyone would voluntarily introduce Apple "The Gatekeeper" in parts of their stack unless they're forced to do it.

You can use swift on the server but what for? You have a gigantic ecosystems in languages X,Y,Z. Even Apple does not use Swift on the server (AFAIK) so why would you?

> Even Apple does not use Swift

Exactly true - they've created all these "working groups" of open source / volunteers to care for Android / Server / Wasm / ... all while being constraint "as an Apple product". Of course the end result is crappy

Re: Swift 6.3

#122

Swift lives only for macOS,iOS and besides those ecosystems does not have a solid and robust ecosystem to be used for anything else. It's a shame but it for sure needs BigTech for it to be used anywhere else.

I still have hope Swift will break free like C# has. I hope one day something like Vapor or Kitura takes off.

If Swift was paired with smh like QT/GTK (could have replaced Vala) it would've been interesting.

Re: Swift 6.3

#123
post #121

Earlier quoted context omitted.

You can use swift on the server but what for? You have a gigantic ecosystems in languages X,Y,Z. Even Apple does not use Swift on the server (AFAIK) so why would you?

> Even Apple does not use Swift Exactly true - they've created all these "working groups" of open source / volunteers to care for Android / Server / Wasm / ... all while being constraint "as an Apple product". Of course the end result is crappy

Yea there is no incentive. Why use Swift on the server or in k8s when you have gazillion other languages that are performant and have the ecosystems.

Re: Swift 6.3

#124

Earlier quoted context omitted.

After that, and IBM losing interest, Apple did hire a few competent people (including contributors to Netty and Akka) to build the Swift Server Workgroup. But I don't know why I'd pick Swift on the server when Rust is better in almost every dimension, with a thriving and more community-driven ecosystem.

I think it's not about that but about dogfooding Swift on the server. Apple uses Go, Java etc for a lot of its server components and refused to invest in hiring people that would extend the ecosystem for server Swift. Thats the problem.

It certainly doesn't help, but among big tech, Apple is not the only company where teams are siloed and independent. Microsoft has people writing Java or Go instead of C# too.

I assume the server side usage is not zero, but not enough to reach a critical mass, you're probably right there.

Re: Swift 6.3

#125
post #13

good to see incredible stuff being shipped in Swift. Haven't used it since v3 though. around 2015-17 - Swift could have easily dethroned Python. it was simple enough - very fast - could plug into the C/C++ ecosystem. Hence all the numeric stuff people were doing in Python powered by C++ libraries could've been done with Swift. the server ecosystem was starting to come to life, even supported by IBM. I think the letdo…

> Haven't used it since v3 though.

Since 5.10 it's been worth picking back up if you're on MacOS.

Re: Swift 6.3

#126
post #73

Earlier quoted context omitted.

Isn’t that Go?

Go and “simple tooling” don’t really belong in the same sentence. Powerful tooling, sure, but simple?

Would be helpful if you elaborate which part is not simple.

Coming from C++ and JavaScript, there aren't many languages that can claim to have "simpler" tooling than Go.

Re: Swift 6.3

#128

Earlier quoted context omitted.

C# is the other direction, IMO. I've been using C# since the first release in 2003/4 timeline? Aside from a few high profile language features like LINQ, generics, `async/await`, the syntax has grown, but the key additions have made the language simpler to use and more terse. Tuples and destructuring for example. Spread operators for collections. Switch expressions and pattern matching. These are mostly syntactic aff…

> Next big language addition will be discriminated unions and even that is really "opt-in" if you want to use it. I was excited for DU until I saw the most recent implementation reveal. https://github.com/dotnet/csharplang/blob/main/proposals/uni... Compared to the beauty of Swift: https://docs.swift.org/swift-book/documentation/the-swift-pr...

The C# impl is still early and I think what will end up happening is that a lot of the boilerplate will end up being owned by source generators in the long term. C# team has a habit of "make it work, make it better". Whatever v1 gets released is some base capability that v2+ will end up making more terse. I'm happy and OK with that; I'd rather have ugly unions than no unions (yes, I already use OneOf)

Re: Swift 6.3

#129
post #111

Earlier quoted context omitted.

> Swift has remained largely an Apple ecosystem Even today, with the fancy Swift 6.3, the experience of using Swift for anything other than apps for Apple platforms is very painful. There is also the question of trust - I don't think anyone would voluntarily introduce Apple "The Gatekeeper" in parts of their stack unless they're forced to do it.

You can use swift on the server but what for? You have a gigantic ecosystems in languages X,Y,Z. Even Apple does not use Swift on the server (AFAIK) so why would you?

What, of course Apple uses Swift on the server, that's the only reason they're investing in any of this. Many of the foundational Swift on the server libraries were written at Apple and later opened, like SwiftNIO.

Re: Swift 6.3

#130
post #29

Earlier quoted context omitted.

Maybe Chris Lattner leaving and creating Mojo also didn’t help in that regard. Swift for TensorFlow was a cool idea in that time …

Lattner probably left because Apple didn't give the team any breathing room to properly implement the language. It was "we must have this feature yesterday". A lot of Swift is the equivalent of Javascrip's "we have 10 days to implement and ship it": https://youtu.be/ovYbgbrQ-v8?si=tAko6n88PmpWrzvO&t=1400 --- start quote --- Swift has turned into a gigantic super complicated bag of special cases, special syntax, speci…

> Swift has turned into a gigantic super complicated bag of special cases, special syntax, special stuff...

That's true, but only partly true. It already was a gigantic super complicated bag of special cases right from the start.

Rob Rix noted the following 10 years ago:

Swift is a crescendo of special cases stopping just short of the general; the result is complexity in the semantics, complexity in the behaviour (i.e. bugs), and complexity in use (i.e. workarounds).

https://www.quora.com/Which-features-overcomplicate-Swift-Wh...

Me, 2014:

Apple's new Swift language has taken a page from the C++ and Java playbooks and made initialization a special case. Well, lots of special cases actually. The Swift book has 30 pages on initialization, and they aren't just illustration and explanation, they are dense with rules and special cases

https://blog.metaobject.com/2014/06/remove-features-for-grea...

Of course, that doesn't mean that it didn't get worse. It got lot worse. For example (me again, 2020):

I was really surprised to learn that Swift recently adopted Smalltalk keyword syntax ... Of course, Swift wouldn't be Swift if this weren't a special case of a special case, specifically the case of multiple trailing closures, which is a special case of trailing closures, which are weird and special-casey enough by themselves.

https://blog.metaobject.com/2020/06/the-curious-case-of-swif...

Oh, and Function Builders (2020, also me):

A prediction I made was that these rules, despite or more likely because of their complexity, would not be sufficient. And that turned out to be correct, as predicted, people turned to workarounds, just like they did with C++ and Java constructors.

https://blog.metaobject.com/2020/04/swift-initialization-swi...

So it is true that it is now bad and that it has gotten worse. It's just not the case that it was ever simple to start with. And the further explosion of complexity was not some accidental thing that happened to what was otherwise a good beginning. That very explosion was already pretty much predetermined in the language as it existed from inception and in the values that were visible.

From my exchange with Chris regarding initializers:

"Chris Lattner said...

Marcel, I totally agree with your simplicity goal, but this isn't practical unless you are willing to sacrifice non-default initializable types (e.g. non-nullable pointers) or memory safety."

Part of my response:

"Let me turn it around: Chris, I totally agree with your goal of initializable types, but it is just not practical unless you are willing to sacrifice simplicity, parsimony and power (and ignore the fact that it doesn't actually work)."

Simplicity is not the easy option. Simplicity is hard. Swift took the easy route.

[...] when you first attack a problem it seems really simple because you don't understand it. Then when you start to really understand it, you come up with these very complicated solutions because it's really hairy. Most people stop there. But a few people keep burning the midnight oil and finally understand the underlying principles of the problem and come up with an elegantly simple solution for it. But very few people go the distance to get there.

-- Steve Jobs (borrowed and adapted from Heinelein)

https://blog.metaobject.com/2014/04/sophisticated-simplicity...

Post reply on HN