Better HN
topnewbestaskshowjobs
Log inSign up

hotmustard

9 karma · joined Apr 1, 2023 (3y ago) · 2 submissions

Submissions

comment 3y ago · link · parent

Yes, and no. I think Swift is doing some things that it can't optimize as well yet. I have some guesses about what that is (forced ref-counting, less control over memory layout, generics), but all I know is I'm getting significant performance gains in some graphics/geometry algorithms where I want to be a performance perfectionist and control everything. This is not a common use case. For building a basic app for iOS, Swift would be way easier.

I've also decided to support other platforms, and when you want to build for Linux, Android, Windows... Swift loses appeal.

Swift is quickly gaining on C++'s infamous "complexity". If you get in the deeper with generics, it's rough.

I've seen recent experiments by Herb Sutter and Sean Baxter, giving C++ a new syntax or adding experimental features as compiler extensions. This makes me think C++ is going to continue to evolve. How exactly, nobody's sure. :)

comment 3y ago · link · parent

Funny thing, I've been moving Swift to C++, for real. I'm paying a price, but also getting some benefits. I'm not convinced that giving up on C++ and rewriting everything in a new language is a great idea. If I could get some compiler extensions to give me some experimental toys and syntactic sugar, I'd never be tempted by Rust/Swift/etc.