News for hackers. Stuff that matters.
Re:Roadmap for Improving the Type Checker by indemnity on Friday October 31, 2025 @02:48AM (#45769055)
As someone who started doing SwiftUI recently, it absolutely boggles my mind that (1) this is even a thing and (2) Apple seem ok to treat it as an unsolvable problem. When you finally solve it is some stupid wrong type passed in somewhere. I agree with the other poster. This is so pathetic it makes me question the competence of the engineers working on Swift.

Smells like “we made a poor architectural / design choice and ain’t walking it back”.

Re:Roadmap for Improving the Type Checker by saagarjha on Friday October 31, 2025 @03:06AM (#45769134)
That is exactly what happened and the competence of the engineers working on the language is not really relevant.
Re:Roadmap for Improving the Type Checker by fingerlocks on Friday October 31, 2025 @04:21AM (#45769518)
Follow a couple of rules and this won’t happen.

Type annotate everything. Don’t mix integers and doubles, be explicit. Most important of all, do not ever make a long chain of nested result building function calls with those stupid trailing untyped dangling {} closures, especially when the closure expects an implicit return of an opaque ‘some’ type.

What I’m saying is, don’t use SwiftUI. It’s a pee filled kiddie pool to attract JavaScript react devs with awful performance and semantics.

Re:Roadmap for Improving the Type Checker by deliriumchn on Friday October 31, 2025 @06:01AM (#45770221)
Well apple themselves are pushing swiftUI and I suspect it will be the main (and only) approach as time goes on, even though its just a wrapper around "older" approach...
Re:Roadmap for Improving the Type Checker by rob74 on Friday October 31, 2025 @09:00AM (#45771511)
So then, another language which has lots of features, but if you are foolish enough to combine feature A, feature B and feature C, bad things will happen? C++ sends its regards...
Re:Roadmap for Improving the Type Checker by an0malous on Friday October 31, 2025 @09:17AM (#45771671)
That sucks because I really like the semantics of SwiftUI over UIKit. Declarative, reactive code just makes sense for UI.
Re:Roadmap for Improving the Type Checker by mdhb on Friday October 31, 2025 @05:58AM (#45770197)
There is a reason why 1/3 apps in the Apple App Store are now written in Flutter instead.
Re:Roadmap for Improving the Type Checker by moooo99 on Friday October 31, 2025 @09:05AM (#45771556)
Because its easier to write one piece to code to target two platforms, regardless of how good or bad the native language for each platform is?
Re:Roadmap for Improving the Type Checker by mdhb on Friday October 31, 2025 @12:31PM (#45773906)
It’s also just nicer to work with in addition to having all of the multi platform stuff taken care of you for free.
Re:Roadmap for Improving the Type Checker by an0malous on Friday October 31, 2025 @09:18AM (#45771681)
Is Flutter more popular than React Native now?
Re:Roadmap for Improving the Type Checker by mdhb on Saturday November 01, 2025 @03:04AM (#45779760)
I think that’s been true for quite some time now
Re:Roadmap for Improving the Type Checker by freedomben on Friday October 31, 2025 @12:26PM (#45773859)
Not pulling the "citation needed" thing at all, genuinely curious (from anyone who might know), is that 1/3 number accurate? Is there data published on it anywhere? That feels like monumental news :-D
Re:Roadmap for Improving the Type Checker by mdhb on Friday October 31, 2025 @12:30PM (#45773897)
https://flutter.dev/multi-platform/ios

It’s actually 28% I just checked but it’s front and centre there if you scroll down.

Re:Roadmap for Improving the Type Checker by freedomben on Friday October 31, 2025 @01:49PM (#45774722)
many thanks!
Re:Roadmap for Improving the Type Checker by techpression on Friday October 31, 2025 @05:33PM (#45776943)
28% of ”free new apps”, whatever that means, measured by someone who’s not Apple (so lacking the actual numbers).
Re:Roadmap for Improving the Type Checker by mdhb on Saturday November 01, 2025 @02:51AM (#45779713)
Don’t get mad about it but a lot of people want to work with Flutter because they think is better for any number of reasons. The data is what it is.
Re:Roadmap for Improving the Type Checker by techpression on Saturday November 01, 2025 @04:34AM (#45780108)
There are plenty of contradicting data, like the job market for Flutter being close to nil, if it was any relevant 30% of the App Store you would throw a rock and hit five Flutter developers.

And nobody’s mad.

Re:Roadmap for Improving the Type Checker by dilap on Friday October 31, 2025 @10:09AM (#45772157)
Swift is an early example of Apple losing its way. Such a stark contrast to Objective-c -- which was a simple, fast compiling language that hit way above its weight for expressivity and runtime speed. A great language for its day. Swift is "a C++ hacker's first attempt at language design".
Re:Roadmap for Improving the Type Checker by pjmlp on Friday October 31, 2025 @10:50AM (#45772587)
I would be fine with a Objective-C 3.0, but the big question would be how to fix the underlying C flaws, which was one of Swift's original goals.

I do agree that the language design has gone overboard in the last couple of years, expecially in the various approaches to parallelism.

However they are not alone, just look at any programming language sponsored by companies, you need features to justify team sizes and naturally old features don't go away.

Re:Roadmap for Improving the Type Checker by dilap on Friday October 31, 2025 @11:16AM (#45772994)
Taste & trade-offs aside, you've gotta make it compile reasonably fast! I do get that Objective-C is not the pinacle of language development, but you shouldn't give your main language the rough edges of a research project.

(And while the past shouldn't necessarily be a shackle on the future, it is striking that such a radically different set of trade-offs was picked for Swift vs Obj-C.)

I think both Go and C# are pretty nice languages, to give you an idea of where I'm coming from. And Rust is very interesting -- as a user you see software that gets written in it exceed the previous state-of-the-art (e.g., ripgrep).

I don't see that w/ Swift. It seems like the opposite. E.g., the terrible Settings rewrite that rolled out a couple releases ago...

Confession, though, while I did a lot of ojbc back in the day, I've never done more than kick the tires on Swift, so I'm not critiquing from a position of deep knowledge -- more like talking shit from the sidelines. But I do think I'm right. ;-)

Re:Roadmap for Improving the Type Checker by pjmlp on Friday October 31, 2025 @11:35AM (#45773239)
C# is starting to get a C++ like feeling, I no longer can keep track of all features that get added every year, especially when not able to work in vLatest in consulting gigs.

Just compare C# 14 with C# 1, laundry list of features, and BCL changes.

Go, has plenty of warts caused by ignoring the history of programming languages.

Rust async/await story isn't that great, as it is kind of half done.

We could also add others to the list, each year get a few more constructs, runtime changes, standard library changes, whatever is the package manager of the year, and so on.

All have issues, then again we can go back to the famous Bjarne Stroustoup quote

"There are only two kinds of languages: the ones people complain about and the ones nobody uses".

Re:Roadmap for Improving the Type Checker by hn-acct on Friday October 31, 2025 @12:51PM (#45774104)
I wasn’t aware objc was considered “fast”.
Re:Roadmap for Improving the Type Checker by dilap on Friday October 31, 2025 @05:07PM (#45776714)
Light-weight wrapper over C, so as fast as C when you want it to be. Message passing isn't as fast as, say, vtables, but is still quite snappy and flexible for loosely binding objects together. No generics avoids code bloat.

In practice obj-c apps were snappy, e.g., good perf on extremely limited hardware of original iPhone. SwiftUI (I assume) of MacOS settings app much slower than the old version it replaced -- too much heavy programmer framework magic resulting in slower final code? That's my diagnosis/guess from afar (I might be wrong ofc), a pitfall that objc did not tend to lead developers into.