Live data from Hacker News

What’s new in Swift 6.2

hackingwithswift.com

161–170 of 258 posts

Re: What’s new in Swift 6.2

#162
post #93

Swift is amateur hour in action by academics that don't value practicality. The new Concurrency was ill thought, and done by people that just perhaps either don't have enough practical experience, or are so enamored with the actor paradigm (erlang) that they had to shove it down the throat in a ecosystem where it is not used that much. No one is really using Swift for distributed programing. Glad they are backtrackin…

Isn't there some contradiction in your comment, I would have thought that distributed programming is precisely the thing that server side programming needs most?

Re: What’s new in Swift 6.2

#163

Earlier quoted context omitted.

Objective-C being stuck in the 1990s forever was not necessarily a good thing.

Stuck in what way? It would have been easy for Apple to make an "Objective-C without the C", where it's still using message passing and the Foundation libraries, but without header files, raw pointers, and all the @messy @syntax. Add little goodies like auto-stringification of enums and so on. I think that kind of superficial cleanup would have been enough to modernize the language. They could have spent the rest of…

I mean, "Objective C without the C" is just Smalltalk. It exists already. But that doesn't help you if you want any amount of backwards compatibility with the existing ObjC ecosystem. So you're kinda forced to go with the low-level approach.

Re: What’s new in Swift 6.2

#164
post #89

Earlier quoted context omitted.

> a language with a garbage collector (Swift) You can certainly make the case that reference counting is a form of garbage collection , but it is absolutely false to say Swift has "a garbage collector." There is no runtime process that is responsible for collecting garbage – allocated objects are freed deterministically when their reference count hits zero. The same thing is true of `shared_ptr` instances in C++, and…

That reference counting is done at runtime. It’s a runtime garbage collector. It’s different than a generational GC, but it’s GC. Those cycles to increment and decrement a counter attached to every object at ever touch aren’t free. All the downvotes in the world won’t make that free.

> That reference counting is done at runtime.

I thought Swift uses ARC just like Objective-C? The compiler elides much of the reference counting, even across inlined functions. It’s not like Python or Javascript where a variable binding is enough to cause an increment (although IIRC the V8 JIT can elide some of that too).

I don’t disagree that it’s a runtime GC but there’s a bit of nuance to its implementation that resists simple categorization like that.

Re: What’s new in Swift 6.2

#165

“Swift has turned into a gigantic, super complicated bag of special cases, special syntax, special stuff…” — Chris Lattner, 2024 https://blog.jacobstechtavern.com/p/apple-is-killing-swift

how can the next great language avoid the trap of syntax bloat while providing the same extraordinary functionality

Re: What’s new in Swift 6.2

#166
post #70
post #57

Earlier quoted context omitted.

The Swift language team has recently open sourced swift-build, and the community's assumption is that it was done in order to eventually move everything away from xcodebuild to swift-build, which would let you build an app from swift packages and fully break from Xcode: https://github.com/swiftlang/swift-build

yep can confirm swift build works, at least i was able to build a MacOS app and avoid Xcode at all costs thanks to it phew

yep Swift build Works magnificently but only for Mac so far

Re: What’s new in Swift 6.2

#167
post #161
post #153

Coding in both swift and rust is really a funny experience. It's like two roads being built going toward the same city, but starting from widely different places.

which is better?

Swift started from beautiful syntax rust has ugly syntax

Swift is becoming more rust like but also safer

Re: What’s new in Swift 6.2

#168

Honest question. Not trying to troll. One of the pitches in the earlier days was “C/Objective-C OK, but you can’t write safe/next level code with it—-Swift will close that gap.” N years later, it doesn’t feel like there has been a step change in Apple software quality; if anything Apple software feels less solid, and looks cool “look what I did” extension points. I mean, some of the tings you could do with runtime ca…

It’s easier to write more robust code with Swift, but if Apple don’t prioritise quality, the language can’t fix that.

Re: What’s new in Swift 6.2

#169

“Swift has turned into a gigantic, super complicated bag of special cases, special syntax, special stuff…” — Chris Lattner, 2024 https://blog.jacobstechtavern.com/p/apple-is-killing-swift

I wonder why the author left Go out of his list of examples of language stewardship.

Re: What’s new in Swift 6.2

#170
Swift is collapsing under the weight of its increasing complexity. So many, many special cases & they keep adding more!

As a developer it becomes so very hard to reason about code behaviour. This is especially true with concurrency, which was meant to simplify concurrent operations, but in actual fact is a nasty can of worms. In an effort to "hide the complexity" it just introduces a huge amount of unexpected & hard to grok behaviour. The new "immediate" Task behaviour & non-isolated async behaviours are good examples of this.

Post reply on HN