News for hackers. Stuff that matters.
Re:C++: terser (shorter) lambda == SHORTY (ab-use?) by hsfzxjy on Saturday April 12, 2025 @06:54AM (#43663283)
Looks cursed to me.

But TIL dollar sign $ is also valid character for identifiers.

Re:C++: terser (shorter) lambda == SHORTY (ab-use?) by tempodox on Saturday April 12, 2025 @08:37AM (#43663855)
> $ is also valid character for identifiers.

Has been like that in C since forever.

Re:C++: terser (shorter) lambda == SHORTY (ab-use?) by skullt on Saturday April 12, 2025 @12:12PM (#43665642)
It's a common extension but it's not standard. Both C23 and C++23 only allow identifiers to start with a Unicode XID_START character, which excludes $. And with older standards, it was just Latin letters, the underscore, and explicit \u escapes.
Re:C++: terser (shorter) lambda == SHORTY (ab-use?) by ksherlock on Saturday April 12, 2025 @05:13PM (#43667980)
VMS used $ - eg

    sts = sys$getjpiw(0, 0, 0, &jpi_itm_lst, 0, 0, 0);
    if ((sts & STS$M_SEVERITY) != STS$K_SUCCESS)
That might be why GCC originally included $ support.