On 12/03/14 04:24 PM, Patrick Walton wrote: > It's not as dire as you suggest. We can just allow some further passes > to continue if earlier passes fail. We have this "ty_err" infrastructure > in place already. Parsing creating an incomplete AST is also possible. > > I don't really think that Go is that much easier to do completion on. > Type inference in Rust is more powerful, sure, but Go has type inference > too. Same with trait imports: it's all lexical in Rust, so that should > work too. C++ is much worse, with its strange intertwined parsing and > typechecking and template expansion, and Visual Studio does a good job > with that. JetBrains offers code completion for Scala, which is more > complex than Rust with implicits and such. > > Patrick
Go doesn't really have what I would call type inference. It just takes the type from the right-hand side so it's not much different than writing foo(bar(2)) instead of `x := bar(2); foo(x)`. C++ makes it impossible to provide accurate completion without implementing most of a compiler. You don't need as much of a compiler to do it for Rust, but you still need a lot.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
