politeness-macro

Crates.iopoliteness-macro
lib.rspoliteness-macro
version0.1.0
sourcesrc
created_at2022-03-10 09:28:06.487547
updated_at2022-03-10 09:28:06.487547
descriptionIsn't it time to be a bit nicer to rustc?
homepage
repositoryhttps://github.com/ry00001/politeness-macro
max_upload_size
id547516
size1,341
Rin (ry00001)

documentation

README

politeness-macro

Aren't we all too rude to computers? Isn't it time to bring a bit more politeness into our programming? Shouldn't we be a bit nicer to rustc?

Well, now we can be! Introducing polite!, the macro that makes you say please.

Using polite! is simple, simply put valid Rust code into a polite block and watch it not compile because it's too rude. To get your code to compile again, just say please! Inserting please into your code will get rustc to compile it again, but don't do it too much or it's gonna think you're too polite!

Why?

I'm the same person that did this. What do you mean why.

Code example

use politeness_macro::polite;

fn main() {
    polite! {
        // println!("hello, world"); // DOES NOT COMPILE
        
        please println!("hello, world"); // does compile!
    }
}
Commit count: 2

cargo fmt