Elektrine lite

← Feed

@Hyperlynx@aus.social

Post #2456454

2026-04-22 03:14 UTC

@joxean@mastodon.social but, also, are you not using constants in general? That's really bad practice to sprinkle your code with "magic numbers" rather than using constants. It's A: harder to read, and B: a maintenance pain in the backside if the value ever needs to be changed. Unless you're talking about const vs constexpr, in which case I don't think it makes much practical difference.

Replies (1)

  • @joxean@mastodon.social 2026-04-22 07:05

    @Hyperlynx@aus.social I do use constants, usually marked as constexpr (or rarely as #define UPPERCASE value), but commonly outside of functions/member functions. What I was referring is about using const only in the constants inside of local functions/members for POD.

    Open ##2456455