Readit News logoReadit News
mannuch commented on Packaging Swift Apps for Alpine Linux   mko.re/blog/swift-alpine-... · Posted by u/todsacerdoti
xvilka · 2 years ago
There's no reason to use Swift outside of the Apple platform. Rust is much better option and more cross-platform. And they work hard on reducing the binary size as well.
mannuch · 2 years ago
Well I for one appreciate Swift’s focus on ergonomics and progressive disclosure. I think Rust is great, but I don’t see it as a great application-level programming language.

I think it’s wonderful that Swift is trying to be more cross-platform. No need to shoot down the efforts of people trying to bring a language they like to more places.

mannuch commented on Embedded Swift [video]   youtube.com/watch?v=Lqxbs... · Posted by u/surprisetalk
KolmogorovComp · 2 years ago
I'm not sure what's Apple plan here, as others have stated Swift will stay for the foreseeable future 'IOS language', and even if it is used internally, why not use Rust instead who provides a similar kind of safety and convenience, and is already much more used in embedded devices? Assuming the reason is to avoid using C/Cpp.

Given engineers' skills at Apple using Rust would not be an issue.

mannuch · 2 years ago
Rust is much less ergonomic than Swift, especially for application-level development.

I like to think about it like this: Rust forces you to think about memory where Swift doesn’t.

But what’s really cool is that Swift is adopting some of the great things about Rust’s ownership system, allowing you to “opt-in” to a Rust-style performance profile if you think the mental overhead is worth it for your use-case or domain.

To see what I’m talking about check out https://youtu.be/I9XGyizHxmU?si=Zl-7dA0NqhnctRPQ

What’s exciting to me is that Swift is becoming a great language that works at all levels of the stack while staying a language that feels really great to write.

IMO what’s largely held it back in adoption is its cross-platform experience, but you see that the Swift team is really trying to change the perception here (they’ve specifically tried to highlight using non-Xcode/non-Mac dev environments, deploying to Linux, developing embedded etc.).

mannuch commented on Swift Static Linux SDK   swift.org/documentation/a... · Posted by u/mannuch
heavyset_go · 2 years ago
Given there is native C++ interop, is exporting a C ABI still a seemingly experimental/niche feature? Same question with interop between C and Swift.

Recently went with using Kotlin Native over Swift on macOS for this reason, the C ABI export and C interop were painless.

mannuch · 2 years ago
Swift has had first-class C interop for a long time.

It is only C++ interop that is more experimental/in-progress.

mannuch commented on Swift Static Linux SDK   swift.org/documentation/a... · Posted by u/mannuch
vips7L · 2 years ago
> - No garbage collector

ARC is a GC, and a slower one than most traditional tracing GC's.

mannuch · 2 years ago
First of all, traditional (tracing) GCs require more expensive runtimes and consume much more memory. ARCs are also much more predictable in their behavior and pave the way for greater compile time optimizations. ARC is key in providing Swift its ability to maintain its low memory footprint compared to, say, Java.

Second, yes, ARC is a GC method. But when the language says "no garbage collector", they just mean no traditional (tracing) GC runtime because, for better or worse, tracing GC is what people think of when they hear "garbage collector".

mannuch commented on Swift Static Linux SDK   swift.org/documentation/a... · Posted by u/mannuch
hugodan · 2 years ago
Wasm? Care to provide source for that?
mannuch commented on Swift sucks at web serving or does it?   wadetregaskis.com/swift-s... · Posted by u/MBCook
pjmlp · 2 years ago
Even the selection of frameworks is kind of weird, versus

https://www.techempower.com/benchmarks

This is what would be interesting to see Vapour/Swift on.

mannuch · 2 years ago
I don't think this blog post ever intended to provide a comprehensive comparison between Swift/Vapor and other languages/frameworks.

I think the bigger lesson from this writeup is that we should be careful when looking at these kinds of benchmark comparisons because there may be much more nuance to their results than there initially appears to be.

u/mannuch

KarmaCake day185January 15, 2020View Original