HackerTrans
TopNewTrendsCommentsPastAskShowJobs

mannuch

no profile record

Submissions

Noncopyable Types in Swift

youtube.com
1 points·by mannuch·2년 전·0 comments

Swift on Neovim

swift.org
4 points·by mannuch·2년 전·0 comments

Swiftly: A Swift toolchain installer and manager, written in Swift

github.com
3 points·by mannuch·2년 전·0 comments

Swift Static Linux SDK

swift.org
339 points·by mannuch·2년 전·262 comments

comments

mannuch
·2년 전·discuss
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
·2년 전·discuss
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
·2년 전·discuss
Swift has had first-class C interop for a long time.

It is only C++ interop that is more experimental/in-progress.
mannuch
·2년 전·discuss
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
·2년 전·discuss
https://github.com/apple/swift-for-wasm-examples?tab=readme-...
mannuch
·2년 전·discuss
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.
mannuch
·2년 전·discuss
Swift has a pretty good VSCode extension these days actually.

Check out https://marketplace.visualstudio.com/items?itemName=sswg.swi...
mannuch
·2년 전·discuss
Yeah I get that it's frustrating. But it is open source, and there isn't anything stopping you or anyone else from making contributions that bring the language to more places. Sure, various aspects of the project could be improved but that doesn't mean it is "half assed".
mannuch
·2년 전·discuss
How recent were your experiences?

The server-side Swift ecosystem has matured over the past few years, with specific attention from teams at Apple.

For example, regarding JSON, there has been a rewrite of the JSON encoder/decoder that results in a 200% - 500% speed up in deserialization! You can read about the (still ongoing) improvements to Foundation at https://github.com/apple/swift-foundation

Regarding logging, Apple has been pushing the development of community around the swift-log package at https://github.com/apple/swift-log. Maybe you’ve seen this, but just wanted to share!

One last thing: the Swift VSCode extension is actually really good! Not sure when you used it last, but I’ve been using it on a regular basis and it’s been great — and is only getting better. Here’s the link to the extension if you’re curious: https://marketplace.visualstudio.com/items?itemName=sswg.swi...

It’s true that Swift has had its various issues, but there’s a very real push by the core team and community to bring the language to new heights and places. Cross-platform support is getting better and better (check out what The Browser Company is doing with Swift on Windows) and a big source of performance bottlenecks are being addressed with the development of non-copyable and non-escaping types (Rust-like move-only types)!

Sorry that’s a lot, but I just wanted to point out that there’s a lot of hope in Swift and really interesting things are happening for the project!