you are viewing a single comment's thread
view the rest of the comments
[+] -10 points 8 months ago (1 child)

Average Rust code:

macro_rules! sum {
    ( $initial:expr $(, $expr:expr )* $(,)? ) => {
        $initial $(+ $expr)*
    }
}

fn remove_prefix<'a>(mut original: &'a str, prefix: &str) -> &'a str

let mut up = 1;
    'outer: loop {

This is on the level of the esolang I made at 8 y/o, with random characters denoting random actions everywhere, at random positions.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 16 points 8 months ago

    It's incredibly disingenuous to call this average Rust code and further erodes your credibility. I may as well point to hundreds of lines of preprocessor macros in a C++ header and call it average C++ code.

    This is not what an average Rust developer is writing 99% of the time. If someone on my team submitted a PR with an implementation of sum that uses macro_rules! I would almost certainly reject it.

  • source
  • parent