Live data from Hacker News

Swift Achieved Dynamic Linking Where Rust Couldn't (2019)

faultlore.com

11–20 of 279 posts

Re: Swift Achieved Dynamic Linking Where Rust Couldn't (2019)

#11

I have heard great things about Swift but haven't spent a second looking into it because I assumed it's an Apple exclusive language - making it unsuitable for my use case of services deployed on Linux, developed from any OS. To what extent, if any, is Swift exclusive to Apple devices?

It's Apple-exclusive in the same way that C# is Windows-exclusive or Go is Linux-exclusive.

You'll have a much better time programming C# on Windows or Swift on macOS, because that's where all the best tooling is. The tools and libraries are open-source, cross-platform, and mostly maintained by one company.

Re: Swift Achieved Dynamic Linking Where Rust Couldn't (2019)

#12

I have heard great things about Swift but haven't spent a second looking into it because I assumed it's an Apple exclusive language - making it unsuitable for my use case of services deployed on Linux, developed from any OS. To what extent, if any, is Swift exclusive to Apple devices?

I'd say that it isn't particularly useful, outside of the Apple ecosystem, but I do know that there has been Linux, and even Windows, support. In my case, I don't really care, as I program Apple native. I think it's an excellent language. I enjoy writing in it. I write Swift, every day.

Conversely, I don't really care about swift because it isn't particularly useful outside of the apple ecosystem.

Re: Swift Achieved Dynamic Linking Where Rust Couldn't (2019)

#13
This past week I’ve been reverse engineering the macOS IOMobileFramebuffer to find a way to disconnect displays in software for Lunar (https://lunar.fyi/).

And I kept stumbling upon these witness tables while debugging.

This led me to find this write-up and the much more interesting story behind it.

The end note was priceless ^_^

collapses

Re: Swift Achieved Dynamic Linking Where Rust Couldn't (2019)

#14

I have heard great things about Swift but haven't spent a second looking into it because I assumed it's an Apple exclusive language - making it unsuitable for my use case of services deployed on Linux, developed from any OS. To what extent, if any, is Swift exclusive to Apple devices?

It's Apple-exclusive in the same way that C# is Windows-exclusive or Go is Linux-exclusive. You'll have a much better time programming C# on Windows or Swift on macOS, because that's where all the best tooling is. The tools and libraries are open-source, cross-platform, and mostly maintained by one company.

That's really not the case with C# or Go. C# has first class Linux support nowadays (minus GUI support) and using Go on windows is quite easy (I daily drive go on windows at work).

Re: Swift Achieved Dynamic Linking Where Rust Couldn't (2019)

#15
Love the article.

In my mind I see the problem of dynamic linking in rust to have a bunch of overlap with the "I want this rust library to be exposed in my higher level GC'd language with minimal safety issues/tedious handmaintained bindings" problem.

My hunch is that the lack of expressiveness of the C ABI is holding back both. the thing I'd love to see some sort of "higher level than the C ABI" come out. And something like `wasm-bindgen`[0] to exist for more languages.

Here's a link to the rust "interopable_api" proposal! I don't understand all the implications, but it seems to be in the right direction https://github.com/rust-lang/rust/pull/105586

[0]https://rustwasm.github.io/docs/wasm-bindgen/

Re: Swift Achieved Dynamic Linking Where Rust Couldn't (2019)

#17

Earlier quoted context omitted.

It's Apple-exclusive in the same way that C# is Windows-exclusive or Go is Linux-exclusive. You'll have a much better time programming C# on Windows or Swift on macOS, because that's where all the best tooling is. The tools and libraries are open-source, cross-platform, and mostly maintained by one company.

That's really not the case with C# or Go. C# has first class Linux support nowadays (minus GUI support) and using Go on windows is quite easy (I daily drive go on windows at work).

With Maui, you can now have first class Linux gui support, same with Blazor. You can also even do some of the more cutting edge stuff on linux like compiling straight to ASM.

Re: Swift Achieved Dynamic Linking Where Rust Couldn't (2019)

#18
post #8

Earlier quoted context omitted.

Swift is backed by LLVM and Linux solid is pretty solid. The cross platform problem has always been the core libraries. Fortunately a pure Swift core foundation rewrite is underway. https://www.swift.org/blog/future-of-foundation/

Looks like I may eventually give Swift a try once the rewrite is done! I've been watching Swift for a while now but I don't have a Mac so I haven't had a reason to try it. Do you happen to have any idea about UI library support? Will UI still be Apple only?

As far as I know all of the UI stuff is dependant on iOS and macOS specific libraries. Apples UIKit and AppKit libraries are still proprietary here (and even have completely different capabilities depending on your platform and OS version).

Re: Swift Achieved Dynamic Linking Where Rust Couldn't (2019)

#19
post #17

Earlier quoted context omitted.

That's really not the case with C# or Go. C# has first class Linux support nowadays (minus GUI support) and using Go on windows is quite easy (I daily drive go on windows at work).

With Maui, you can now have first class Linux gui support, same with Blazor. You can also even do some of the more cutting edge stuff on linux like compiling straight to ASM.

Are you sure Maui provides native Linux GUI support? (Not through a WebView)
Post reply on HN