Remix.run Logo
emoII 13 hours ago

And the typesystem is built in a way that it does not really help you due to typechecking being so slow. Make an error/begin refactoring in ocaml: just follow the typechecker until you’re done. Make an error/begin refactoring in swift: you plan ahead because the typechecker will crash with a timeout or give you non-root-cause errors.

Yesterday I changed the signature of a method, and instead of complaining at the callsites I got a ”ambiguous method” error for a built in SwiftUI view modifier. Kinda hard to track down if you’re not completely aware of the changes you’ve made

happytoexplain 13 hours ago | parent [-]

This falls under the "new frameworks" category I glossed over. SwiftUI, SwiftData, etc, are failures in my opinion. SwiftUI in particular abuses the type system. In your own code the type system is very helpful.

mpweiher 11 hours ago | parent | next [-]

If just about every big new framework in a language is a failure, what does that say about the language?

zffr 11 hours ago | parent | prev | next [-]

If you do a lot with combine publishers, then you might also have a hard time with the type system

cosmic_cheese 12 hours ago | parent | prev [-]

Yep. If you’re writing good code that avoids common smells things are perfectly speedy. Usually if you’re making the compiler grumpy you should be sitting back and reconsidering your design anyway.

rudedogg 12 hours ago | parent | next [-]

It has nothing to do with code quality: https://danielchasehooper.com/posts/why-swift-is-slow/

mpweiher 11 hours ago | parent | prev [-]

Hmm...getting strong "you're holding it wrong" vibes here.