I love Rust. But sometimes it holds me back. And when starting an idea, this can be really exhausting. Rust wants you to write good, clean code, and that is the right default, but sometimes you just want to be quick and dirty. Get the code on the screen, work on it, then put it into good shape.
So imagine we had some kind of preprocessor, which takes "bad/simple" Rust code and translates it into normal Rust code. A trait definition may become
MyStruct Default default() {
Self {
x: 0,
y: 0,
}
}
, which is then translated to normal Rust for long term maintenance.
I was wondering if maybe anyone knew a macro like this, or some tool, allowing you to write simpler code and having a compiler infer what the complete definition should be. It would also bypass a lot of Rust's quality standards, which are good, but are more of a hurdle at the early stages of a codebase.
Maybe this can be thought of as something similar to derive macros, only for more applications than deriving a trait.
For example to infer the types of arguments or return types. or any types, or needed trait definitions at all.