Earlier quoted context omitted.
Which keywords would you get rid of and why? You don't have to use all of them!
1. You don't have to use it all, but someone will. And there are over 200 keywords in the language: https://x.com/jacobtechtavern/status/1841251621004538183 2. On top of that many of the features in the language exist not because they were carefully designed, but because they were rushed: https://news.ycombinator.com/item?id=47529006
Swift 6.3
51–60 of 239 posts
Re: Swift 6.3
#52Earlier quoted context omitted.
I don't know why anyone would want to use Apple tools if they are not developing for Apple platforms. Apple barely maintains compatibility for their own platforms, using Swift on a non-Apple platform is setting yourself up for doubule pain.
That was true for Swift 2, maybe a little for Swift 3, but it has not been true since a long time now…
Plus Swift is arguably too unnecessarily complex now.
And there's Rust/Zig so why use Swift for low level?
Re: Swift 6.3
#53Earlier quoted context omitted.
That's my read too. Swift was feeling pretty exciting around ~v3. It was small and easy to learn, felt modern, and had solid interop with ObjC/C++. ...but then absolutely exploded in complexity. New features and syntax thrown in make it feel like C++. 10 ways of doing the same thing. I wish they'd kept the language simple and lean, and wrapped additional complexity as optional packages. It just feels like such a smal…
Which keywords would you get rid of and why? You don't have to use all of them!
I would remove the distinction between value types and reference types at the type level. This has caused so many bugs in my code. This distinction should be made where the types are used not where they are defined.
I would remove everything related to concurrency from the language itself. The idea to let code execute on random threads without any explicit hint at the call site is ridiculous. It's far too complicated and error prone, which is why Swift designers had to radically change the defaults between Swift 6.0 and 6.2 and it's still a mess.
I would remove properties that are really functions (and of course property wrappers). I want to see at the call site whether I'm calling a function or accessing a variable.
I would probably remove async/await as well, but this is a broader debate beyond Swift.
And yes you absolutely do have to know and use all features that a language has, especially if it's a corporate language where features are introduced in order to support platform APIs.
Re: Swift 6.3
#54Earlier quoted context omitted.
I _can_ do the same with Rust, doesn't mean it's "the language I reach for" for making e.g. a website. Because the tooling, ergonomics, hireability factor, etc. are still very harshly against it. Same with Swift, but I'd call that more of a wasted opportunity because Apple, unlike Rust Foundation, has a mountain of money to make it happen, and yet they don't seem to care.
> They don't seem to care. I don’t believe that’s true. Things are moving constantly, and in the right direction. Then again it would help if you cited particular grievances, because being a regular (cross-platform/cross-target) Swift user I am not sure what you are talking about… I did not choose ClearSurgery’s example randomly. I was at a conference recently where the CTO was here, and he explicitly told us they we…
Hah! I'll use that argument if I ever get PIP'd.
No but seriously, constantly moving doesn't mean fast enough. Swift took took long to have cross-platform support.
And it is still uberslow to compile. To the point of language servers giving up on analyzing it and timeout.
Re: Swift 6.3
#55> Swift is designed to be the language you reach for at every layer of the software stack. It's a nice lang for sure, but this will never be true with the way things are. Such wasted opportunity by Apple.
How so? I can indeed target every layer of the software stack using Swift, today . E.g. ClearSurgery[0] is written fully in Swift, including the real-time components running on the Linux boxes. [0] https://clearsurgery.vision
With a simple tooling. No ugly script. Everything is naturally integrated.
Re: Swift 6.3
#56Earlier quoted context omitted.
> Swift could have easily dethroned Python No way something that compiles as slowly as Swift dethrones Python. Edit: Plus Swift goes directly against the Zen of Python > Explicit is better than implicit. > Namespaces are one honking great idea -- let's do more of those! coupled with shitty LSP support (even to this day) makes code even harder to understand than when you `import *` in Python. Edit 2: To expand a littl…
>No way something that compiles as slowly as Swift dethrones Python. This must have pushed Chris Lattner towards making Mojo both interpreted and compiled at the same time.
Re: Swift 6.3
#57good 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…
True. Google was even thinking of switching TensorFlow from Python to Swift. https://github.com/tensorflow/swift
I wrote an eBook on Swift several ago but rarely update that book anymore. Count me as one of the many developers who for a while thought Swift would take over the world. At least Swift is a fun language to use, and now with LLM coding tools writing macOS/iOS/iPadOS apps is fairly easy.
Re: Swift 6.3
#58Earlier quoted context omitted.
I don't know. Could be nice for those developers that prioritize iOS and now they could keep writing Swift also for Android. Is it gonna be what you primarily use if you wanna write an Android app? Probably not. Is it gonna displace react Native? Probably not. Is it gonna reach the levels of flutter? Maybe.
The language doesn’t really matter. The underlying SDK/framework is where the action is at. However, I suspect that we may not be too far off, from LLMs being the true cross-platform system. You feed the same requirements, with different targets, and it generates full native apps.
Re: Swift 6.3
#59good 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…
Just IMO, but... no. To me a "could have easily" requires n-1 things to have happened, and 1 thing not happening. Like, we "could have easily" had a nuclear exchange with the USSR, were it not for the ONE Russian guy who decided to wait for more evidence. https://en.wikipedia.org/wiki/1983_Soviet_nuclear_false_alar...
But even in '15-'17, there were too many people doing too many things with Python (the big shift to data orientation started in the mid/late 90's which paved the way to ML and massive python usage) by then.
The 'n' was large, and not nearly of the 'n' things were in Swift's favor then.
Again, IMO.