Earlier quoted context omitted.
The other reason is interop with other languages, which might have their own rules for identifiers.
I'm trying and failing miserably to think of a single example of such a language.
What’s new in Swift 6.2
181–190 of 258 posts
Re: What’s new in Swift 6.2
#182Earlier quoted context omitted.
I have a good bug right now. My wife bought a Macbook Air. I use High DPI and she does not. It is impossible to switch between users in this situation, one of the core functionalities of the computer is just broken. Makes me wonder if anyone at Apple uses these computers..
No one tests multi-user functionality, afaict.
She comes across bugs on the regular that I’ve never seen in 16 years of Mac use, but only when the other user account is logged in (i.e. quick user switching rather than a full log out).
Stuff that user accounts shouldn’t even make any difference to, like the menu bar disappearing or rendering too far up so it’s half off screen. Save dialogs stop appearing. Windows that are open but appear to be rendering off screen somewhere. It’s wild. This is on a < 1 year old MacBook Air running the latest OS. It’s an absolute shambles.
Re: What’s new in Swift 6.2
#183Re: What’s new in Swift 6.2
#184“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
#185It sure feels like Swift governance is broken. They're just shoveling stuff in to the language. Individually, most items aren't so bad, but collectively they've got a mess and it's getting bigger fast. None of the decision-makers seem to have the sense or incentive to say "no" to anything. It's sad, because the language had such promise and there are some really nice things in there. Well, at least it's relatively ea…
I enjoy "bloated" languages. Many languages are bloated nowadays, but the community agrees what set of features to use, what to avoid. Still, those rare features can be useful for stuff like making DSLs through clever use of the language.
It's much worse to have a minimal language that takes years to add new features, like how Go took over a decade to add generics.
Re: What’s new in Swift 6.2
#186Honest 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…
As someone frequently flipping between Swift and Kotlin, while I don’t necessarily feel like Swift is massively superior, I often find myself thinking “why is this so quirky and pedantic” when writing Kotlin. For example, I really really wish Kotlin would adopt Swift style if let/guard let statements. Kotlin smart casting doesn’t work just often enough to not be able to consistently rely on it and the foo?.let { } sy…
It’s a set of tools intended to do just that.
Re: What’s new in Swift 6.2
#187“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
To be fair, every new language version usually includes things that eliminate those special cases making writing the code more straightforward. Like the described support of functions in key paths, or the ability to set default global actor isolation.
Re: What’s new in Swift 6.2
#188Earlier quoted context omitted.
I feel the same. Apple software quality certainly hasn’t increased . Years back I remember some apps crashing suddenly after updating MacOS. I checked the binary and saw they’d started adding Swift. Half a decade later it seems like it should be better and Swift stuff should be stabilized. But nope, I’ve had more little glitches in both iOS and MacOS. It’s hard to say it’s due to Swift, and not management priorities.…
It is not just the language but the frameworks. SwiftUI is a wreck, and still not mature even after 6-7+ years in 'production'. You still have to drop to UIKit to do advanced UI, and for what it is, SwiftUI is just not practical enough for cases that are not trivial. The trouble is that all new kids/engineer are learning it first, which means software wont get better. Apple need to improve it first, and I don't see a…
I have published a word game written entirely in SwiftUI [1], the effects and animations would have been much more difficult to do in UIKit, and the app itself would have been hairier to write and maintain [2]. I also track crashes, and this particular app has had four crashes in the past year, so I am very pleased with the stability
That said, there are definitely times, as you say, where you have to drop to UIKit. For the word game mentioned above, I had to drop down to UIKit to observe low-level keyboard events in order to support hardware keyboard input without explicitly using a control that accepts text input
SwiftUI is mature, it's pretty advanced — especially for graphics and animation heavy UI. It has limitations, particularly around advanced input event handling, as well as the application/scene lifecycle
I plan to continue to use both UIKit and SwiftUI where they make sense. It's easy enough to bridge between them with UIHostingController and UIViewRepresentable
[2] Specific examples include: image and alpha masking is trivial in SwiftUI, Metal Shaders can be applied with a one-line modifier, gradients are easy and automatic, SwiftUI's Timeline+Canvas is very performant and more powerful than custom drawing with UIKit. Creating glows, textured text and images, blurs and geometry-based transitions is much easier in SwiftUI
Re: What’s new in Swift 6.2
#189Re: What’s new in Swift 6.2
#190I've been starting to use Swift again lately after like four years, and while the language is beautiful & the package management story is now a LOT better with SwiftPM, I found that none of it plays nicely with XCode, Simulator, or anything to do with iOS/macOS development -- its primary use-case! I found myself awestruck that I *HAD* to use XCode or xcodebuild, and could not just run `swift build` and generate an iO…
If you ask me, those platform specific things should never be integrated part of the language.