this post was submitted on 17 Dec 2025
491 points (96.1% liked)

Programmer Humor

28192 readers
737 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] asdfasdfasdf@lemmy.world 23 points 2 weeks ago* (last edited 2 weeks ago) (6 children)
  1. Macro syntax technically isn't even Rust
  2. This is definitely not average Rust code.
[–] tatterdemalion@programming.dev 1 points 2 weeks ago (3 children)

Sorry, I love Rust but I can't really agree with you here. They only showed a macro_rules! definition, which is definitely rust syntax. Lifetime annotations are relatively common.

I will concede that loop labels are incredibly rare though.

[–] asdfasdfasdf@lemmy.world 1 points 2 weeks ago (1 children)
[–] tatterdemalion@programming.dev 1 points 2 weeks ago

I guess I see what you mean if we want to get very technical about what a syntax extension is. But I think for the purpose of this discussion, it's reasonable to think of macro_rules! as a part of the Rust language. Practically speaking, it is syntax provided by the language team, not just users of the language who are free to extend the syntax by using macro_rules! to do so.

load more comments (1 replies)
load more comments (3 replies)