Hacker News new | past | comments | ask | show | jobs | submit login

I see a lot of work going on making the compiler faster (which looks hard at this point), but I wish I just would be able to make correct changes without needing to recompile code at least.

The extract function tool is very buggy. As I spend a lot of time refactoring, maybe putting time in those tools would have a better ROI than so much work into making the compiler faster.




Keep in mind that the people working on rustc are not the same working on rust-analyzer, even if there's some overlap in contributors and there's a desire to share libraries as much as possible. Someone working on speeding up rustc is unlikely to have domain expertise in DX and AST manipulation, and vice-versa.


Maybe you're right, but I think both are hard enough that people who are smart enough to do one can do the other if they really want :)

By the way AST manipulation is easy, the really hard part of refactoring (that I had a lot of problem with) is creating the lifetime annotations, which requires a deep understanding of the type system.

I was trying to learn some type theory and read papers to understand how Rust's life times work, but only found long research papers that don't even do the same thing as Rust.

I haven't found any documentation that documents exactly when a function call is accepted by the lifetime checker (borrow checking is easy).


Have you read the rustnomicon section on lifetimes? I found it pretty useful


It's cool, I just looked at the manual.

there's this part though:

// NOTE: `'a: {` and `&'b x` is not valid syntax!

I hate that I can't introduce new lifetime inside a function, it would make refactoring so much easier. Right now I have to try to refactor, see if the compiler accepts it or not, then revert the change.

Sometimes desugaring would be a great feature in itself, sugaring makes interactions between functions much harder to understand.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: