Hacker News new | ask | show | jobs
by kazagistar 3732 days ago
That syntax highlighter would basically have to be attached to a compiler. If a type is Copy, then it follows move semantics instead of copy semantics. Plus, ownership can be transferred through things like method invocations as well, depending on the type signature of the method.
1 comments

A bunch of languages are moving towards integrating IDE tools into the compiler with some kind of API. This allows for on-the-fly type checking, better syntax highlighting, better autocompletion, automatically generating bits of boilerplate, instantly testing a block of code, etc. For a language with a great example of this, check out Idris's IDE protocol: http://docs.idris-lang.org/en/latest/reference/ide-protocol..... The way this works helps create an awesome feedback loop where the editor _is_ the REPL. Something like that would be a great addition to Rust and would definitely help improve the overall tooling for the language.
There is a fairly extensive plan for building out IDE support for Rust: https://www.rust-lang.org/ides.html