this post was submitted on 15 Sep 2025
90 points (89.5% liked)

Programmer Humor

26372 readers
1156 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
[–] SpaceNoodle@lemmy.world 34 points 1 day ago (11 children)

I don't get it. What's wrong with constexpr? It's vastly preferable to macros due to type safety, and const due to compile-time optimization.

[–] RustyNova@lemmy.world 11 points 1 day ago (10 children)

I don't get it either. OP might be angry at compile time (Couldn't be worse than rust)

[–] anton@lemmy.blahaj.zone 6 points 1 day ago (3 children)

Rust doesn't allow type inference in function signatures, c++ does with auto. IIRC, they recommended against using it, because of -you guessed it- compile time.

[–] RustyNova@lemmy.world 2 points 1 day ago (1 children)

TBH I thought it was for refactoring type safety. Making sure that the type is understood and not ready to just change wildly accidentally.

[–] SpaceNoodle@lemmy.world 1 points 1 day ago

I thought that was part of the point - simplifying refactoring.

load more comments (1 replies)
load more comments (7 replies)
load more comments (7 replies)