Open
Description
Some misuse was fixed in #3849, but having these two near-identical identifiers with different semantics is prone to cause further mix-ups.
Find a better name for one of them.
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
JohelEGP commentedon Mar 10, 2020
How about renaming current to effective-current?
CaseyCarter commentedon Mar 10, 2020
I'd like to avoid anything of the form "xxx-current"/"current-xxx" if we can. Now that all of the private variables have been kebab-cased, it's too easy to confuse the exposition only name
foo-bar
with an expression that calculates the difference of the two exposition-only namesfoo
andbar
.JohelEGP commentedon Mar 10, 2020
Ah, right. IIRC, the dash replaced underscores in exposition-only names to make that property more obvious. Now that they're kebab-cased, underscores should once again be viable.
jwakely commentedon Mar 10, 2020
One option would be to define current() as a pair of exposition-only member functions (const and non-const), and we could specify them precisely:
The distinction between
current_
andcurrent()
still isn't huge, but the parentheses would help.Or there's always
CURRENT
in the style ofINVOKE
, but we've moved away from that to kebab-case.tkoeppe commentedon Jun 16, 2025
Editorial meeting decision: we like the suggestion by @jwakely; pull request welcome!