> It also notes that the equal sign before the initializer in a declaration was not present, so int x 1; would define x and initialize it with the value 1.
That isn't so scary; the parenthesized version,
int x(1)
is still seen all the time, in places like C++ constructor member initializers. It's how you actually declaratively initialize a type with that value, rather than initializing the memory with a default constructor and then getting the assignment operator called on the resulting object.
The real issue is that the parentheses in the above used to just be part of the expression, rather than required, so
int x 1
would have worked just as well. I'm fairly certain I'm glad of the change, but the previous state of affairs wasn't crazy.
That isn't so scary; the parenthesized version,
is still seen all the time, in places like C++ constructor member initializers. It's how you actually declaratively initialize a type with that value, rather than initializing the memory with a default constructor and then getting the assignment operator called on the resulting object.The real issue is that the parentheses in the above used to just be part of the expression, rather than required, so
would have worked just as well. I'm fairly certain I'm glad of the change, but the previous state of affairs wasn't crazy.