▲ | mckravchyk 6 days ago | |||||||
C++ does not have a function keyword at all, I wonder why did they add it in the first place. | ||||||||
▲ | Tuna-Fish 6 days ago | parent | next [-] | |||||||
The c++ notation for functions (and types in general) is horrible, and makes parsing much more expensive than it needs to be. Fixing it is step one if you are making a modern language. | ||||||||
| ||||||||
▲ | twoodfin 6 days ago | parent | prev | next [-] | |||||||
To avoid any possibility of reintroducing the Most Vexing Parse? | ||||||||
▲ | gpderetta 6 days ago | parent | prev [-] | |||||||
It doesn't, but you can pretend it does:
They probably want to use the same arrow signature and need something in place of auto as omitting it completely would complicate parsing. |