News for hackers. Stuff that matters.
Re:Embedded Swift [video] by afavour on Saturday June 15, 2024 @01:14PM (#40691071)
I do feel like there’s a “X will be the year of Linux on the desktop!” quality to this stuff. 2024 will be the year of Swift on the server/embedded systems/anywhere that isn’t iOS/macOS!

I really enjoy programming in Swift. But I’m not convinced it’ll ever escape the confines of iOS development because there isn’t that persuasive a case for it. It’s nice. But “nice” isn’t enough motivation to create an entire ecosystem. You’re not going to be able to reuse most iOS-oriented swift code in an embedded system so you’ll be starting from scratch.

Re:Embedded Swift [video] by pjmlp on Saturday June 15, 2024 @01:35PM (#40691224)
It suffices to be the language of choice on Apple platforms.

This kind of embedded stuff is also used internally at Apple, and is preparing the work to replace firmware stuff like iBoot that is written on a Apple specific Safe C dialect.

Re:Embedded Swift [video] by pohl on Saturday June 15, 2024 @04:07PM (#40692356)
Isn’t their motivation just the need to create verifiable foundations for the platform for AI private cloud compute? Everything else should just be gravy.
Re:Embedded Swift [video] by hbn on Saturday June 15, 2024 @01:51PM (#40691362)
What did Go do to make it so ubiquitous? Seems like it was mostly just a “nice” language
Re:Embedded Swift [video] by pzo on Saturday June 15, 2024 @02:29PM (#40691670)
It got introduced at time when completion was less fierce and competing languages sucked at that time. Sometimes it's just as well about timing. Swift, Kotlin, Typescript, Rust didn't exist at that time. If today Go got introduced for the first time I doubt it would gain any momentum.

Swift is probsbly to late to the party considering big competition amount languages and their ecosystems being "nice" today is not enough.

Re:Embedded Swift [video] by serial_dev on Saturday June 15, 2024 @03:45PM (#40692228)
Probably many things...

Google hype, popular cloud native open source projects showing its potential, well known creators, good to acceptable tooling, strong standard library, low memory footprint, concurrency, simplicity, productivity, the whole philosophy behind it.

Some of these are questionable, but I heard all these by some people.

What does this say about Swift's chances to gain mainstream popularity outside of the Apple ecosystem? Probably nothing, as the languages and the circumstances are so different.

Re:Embedded Swift [video] by w10-1 on Saturday June 15, 2024 @02:33PM (#40691698)
Go drove the cloud-native migration from java/enterprise, riding the wave from behemoth machines to small containers, as a result of Google deciding to build alternatives to Java/Oracle and raw C.

The ease of the language and the self-contained binaries just changed how fast that could happen, not whether it would happen.

Re:Embedded Swift [video] by steve1977 on Saturday June 15, 2024 @03:13PM (#40692006)
Kubernetes
Re:Embedded Swift [video] by afavour on Saturday June 15, 2024 @06:24PM (#40693157)
Being backed by Google was huge. Swift is backed by Apple but not outside of their specific use cases. If Apple had announced they were going to start making all their backend services in Swift too I imagine things could have looked very different.
Re:Embedded Swift [video] by vi4m on Sunday June 23, 2024 @02:01PM (#40769281)
Wrong. Apple officially provides:

* linux, windows and wasm compilation targets. They hired the maintainer of wasm project as well. * LSP language server for Swift, to power VSCode and others editors, even though, they use Xcode that doesn't need it * well tested server side libraries similar to netty/jetty (they even have a former Akka developer)

Re:Embedded Swift [video] by pcwalton on Saturday June 15, 2024 @10:51PM (#40694332)
Other commenters have gone over many of the reasons why Go got popular, and I don't claim to know for certain, but in my view one important one is probably Rob Pike. He obviously has a well-known pedigree, he's very articulate, and a lot of people latched on to his "Go philosophy". Combine that with the reputation for unrivaled engineering excellence that Google had in 2009 and it's not surprising that Go got as big as it did.
Re:Embedded Swift [video] by frou_dh on Saturday June 15, 2024 @01:23PM (#40691123)
> “nice” isn’t enough motivation to create an entire ecosystem.

Just look at backend web development. There's prodigious duplication of effort by each language camp to create their own web framework, database libraries, etc. Why does each camp bother? They just think their chosen language is really nice.

Re:Embedded Swift [video] by steve1977 on Saturday June 15, 2024 @01:44PM (#40691297)
Interestingly, there is not too much momentum behind Swift-based web frameworks, despite the language being perceived as nice by many (as far as I can tell).
Re:Embedded Swift [video] by SV_BubbleTime on Saturday June 15, 2024 @01:23PM (#40691124)
The practical use case here imo, is that your low level stuff, your vendor material, your legacy code is all C.

Your high level application gets to be in swift and create objects, I assume have concurrency, a robust error and exception system.

I like it. I’m not sure it’s going to beat Rust or Zig, but I wouldn’t be upset if it did.

I would seriously look at it for the next project. I love that you can keep VS Code, CMake, and dockerize the environment. What I’m not sure about is the debugging.

Re:Embedded Swift [video] by wahnfrieden on Saturday June 15, 2024 @05:06PM (#40692699)
https://skip.tools offers a compelling option for going SwiftUI-first and having Android too. And a vision (and reference implementation) for how to start doing this on more platforms too.