3 ms·
That has literally nothing to do with what the parent comment is talking about. And that's not naivety either. That's because the way type inference, operating
by eridius 10y ago
That has literally nothing to do with what the parent comment is talking about. And that's not naivety either. That's because the way type inference, operating overloading, and literals work together ends up being a combinatorial explosion.
- bendecoste 10y agoKotlin has all of these features and build times don't (noticeably) suffer.
- arcticbull 10y agoAs does Rust.
- slavapestov 10y agoFrom what I've heard Rust has serious build-time issues as well, mostly because of it's inability to perform separate compilation of generic code. Unlike Swift, Rust specializes everything at compile-time, similar to C++ templates.
- steveklabnik 10y agoThat's not exactly true, while that is usually what Rust people write, you can choose to have stuff not monomorphized. I'm also not exactly sure what you mean by "separate" here. As usual, compile times depend on what you're used to. It is something we're working on improving though; we want it to be very fast! We expect incremental recompilation to move out of nightly soonish; that will help quite a bit.
- eridius 10y agoNo it doesn't. Rust doesn't have overloading, or operator overloading, or literal overloading. It literally has none of the pieces that cause the combinatorial explosion in Swift.
- curun1r 10y agoRust does have operator overloading though the traits in the std::ops module. There are only a few (&&, ||, etc) that can't be overridden.
- eridius 10y agoOh you're right about that. I was thinking of custom operators when I said no operator overloading, but of course that's not actually what we were discussing. Still, no literal overloading. Also, there are other differences between Rust and Swift's type systems that allow Rust to do type inference in a way that Swift cannot.