I genuinely, truly enjoy SwiftUI. It has made my products **so much** better.

However, if I see “The compiler is unable to type-check this expression in reasonable time" one more time, I may drop-kick my computer.

@caseyliss Good idea. It'll give you a reason to buy a M4 Pro Mini!!! 😂 @siracusa
@caseyliss -f-wait-unreasonable-time when?
@caseyliss It would be really fun if you tried Flutter sometime :)
@caseyliss Search your feelings, you know it to be true.

@caseyliss 💯!

I’ve developed ridiculous coping mechanisms, like binary searching for the error by commenting out half the code at a time until it compiles again 😫 (thankfully SwiftUI by its nature makes this part comparitively easy)

@caseyliss I'm honestly still new to SwiftUI, but already I think I'd prefer if the error was just: "You messed up a type declaration somewhere, but who knows where!"
@manton it wasn’t that! It was me not unwrapping an optional. Which, okay, fair enough, but I wish I had an actionable error message.
@caseyliss @manton its almost always "some type is wrong or enum is written incorrectly", but it drives me crazy that it can't pinpoint the exact place.

@caseyliss

Try breaking your expressions of anger into distinct sub-expressions.

@Starfia @caseyliss I know this is a joke, but it sure would help if Xcode were better at refactoring. View too complex? Fine — offer me a fix-it that extracts a portion into a new file

@chucker

Except that in my experience, "view too complex" is false. Usually it's just been some minor syntax thing like it was for Casey here.

https://mastodon.social/@caseyliss/113483515930144678

@caseyliss On the bright side, if you drop-kick your computer you can get an M4 Max

@caseyliss “Try breaking your expressions into distinct sub-expressions. :)”

WHAT EXPRESSIONS AM I SUPPOSED TO BREAK UP

@caseyliss a new, smaller, lighter mac mini would hurt your foot less
@caseyliss I tend to extract things not to different files (unless they will be reused) but to ViewBuilder computed properties to keep the size (complexity) of body small.
@caseyliss you’ll be seeing a lot more than one more time, so your computer is safe!
Leo Dion (@[email protected])

Attached: 1 video One of the biggest pains in Swift (and SwiftUI) is the "The compiler is unable to type-check this expression in reasonable time" While it's true it's not helpful. Besides explicitly declaring the type and breaking up your SwiftUI code, what else have you found helpful? In this episode @[email protected] and I discuss the joys and pains of Swift's type system. https://brightdigit.com/episodes/188-ludicrous-types-with-nick-lockwood

C.IM
@caseyliss And the preview pane fails so often. I hope SwiftUI gets a lot of solid improvements in 2025.
@marcedwards @caseyliss Unfortunately, thinking it *has* to get better next year is why we’re still in this state of building apps with poor tooling. We’re at the 10 year mark of Swift and we’re dealing with a compiler that’s slower and more complex than it’s ever been, despite running on hardware that’s faster than ever. Huge respect for the dev tooling teams, but history has shown that we shouldn’t hold our breath for a miracle.
@kirb Yep, I agree with all of that. I’m mostly happy, but there are definitely areas that are not good enough. +@caseyliss