this post was submitted on 06 Oct 2026
458 points (98.9% liked)

Greentext

8819 readers
490 users here now

This is a place to share greentexts and witness the confounding life of Anon. If you're new to the Greentext community, think of it as a sort of zoo with Anon as the main attraction.

Be warned:

If you find yourself getting angry (or god forbid, agreeing) with something Anon has said, you might be doing it wrong.

founded 3 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] e8d79@discuss.tchncs.de 25 points 5 days ago (2 children)

If you have a constant expression like 1 + 2 in your code you can evaluate it at compile time once and avoid computing it at runtime. You can do that with control flow and much more complex language constructs in C++. If you want to know more about that look into C++ template meta programming, constexpr, and constval.

[–] timochka@lemmy.zip 7 points 5 days ago

Translation: "We've made the preprocessor a first-class language feature!"

(jk, don't kill me)

[–] Hadriscus@jlai.lu 2 points 5 days ago