News for hackers. Stuff that matters.
Re:C++ Modules Might Be Dead-On-Arrival by phkahler on Monday January 28, 2019 @08:06AM (#19017118)
>> It seems like we've been making a weird trdeoff, by disallowing kebab-case just so we can smash our operators together with our operands.

Some people don't want to bother putting a space between operators and operands, and proponents of kebab-case just don't want to push the shift key to get an underscore.

Re:C++ Modules Might Be Dead-On-Arrival by wtetzner on Monday January 28, 2019 @01:18PM (#19019685)
To get kebab-case, the restriction that identifiers cannot start or end with '-' gets you pretty far. The only whitespace change is that you sometimes need whitespace around an infix '-'. Other operators are still fine, and it still works fine for prefix and postfix operators.

Also, the reason to prefer kabab-case for me has nothing to do with avoiding a keypress. It's that I find kebab-case easier to read.

Re:C++ Modules Might Be Dead-On-Arrival by ModernMech on Monday January 28, 2019 @08:38AM (#19017299)
As the other poster mentioned, you gain more than just the dash when forcing white space; you get forced readability and characters like / ? and ^ in identifiers. Then you can name things like foo/bar or e^x
Re:C++ Modules Might Be Dead-On-Arrival by mikepurvis on Monday January 28, 2019 @08:59AM (#19017423)
I suppose I could get used to that, but it sounds like a nightmare at first blush.
Re:C++ Modules Might Be Dead-On-Arrival by plopz on Monday January 28, 2019 @09:18AM (#19017552)
I don't think I could handle i ++ instead of i++
Re:C++ Modules Might Be Dead-On-Arrival by mort96 on Monday January 28, 2019 @10:25AM (#19018098)
You wouldn't have to require whitespace around all operators; you could, for example, decide that infix math/bitwise/logic operators must have a space around them, while other operators (like the infix operators `.` and `->`, and the prefix/suffix `++`, `--`, `[...]`, and `!`) wouldn't require whitespace.

I agree that nobody would want to write `i ++` or `foo [10]` or `myvar . mymember`, but I think a lot of people could get behind `10 - 20` and `foo && bar` instead of `10-20` and `foo&&bar`.