I’d like the macros current_path! and stuff like that.
Example usage would be in other macros such that:
myrust! {
mod foo;
}
can actually expand to the following:
mod foo {
contents of foo.rs
}
This would be useful to remove most of the compiler and instead implement everything as variations of a large macro. recursively invoke a macro for submodules, such that the macro matches the contents of the submodule.
Not only would you be able to write rust with optional semicolons, define foo!
as sugar for into, etc, but you’d be able to do different things for different crates and they’d all compile on stable rust!
You get all the benefits of fragmentation (innovation, best tool for the job, etc) with none of the drawbacks (it’s still Rust no matter how non-rust-like it looks).
Things like NLLs and match ergonomics would still need to be part of the compiler, but things like tryfn and stuff would no longer be built-in!