Ivan Enderlin @ Hoa wrote:
Finally, I would like to clarify my proposal: I just wanted to discuss about
making try/catch braces optional and not criticize PHP syntax…
The problem here is rather, could we make brackets compulsory everywhere? No because of BC problems, but this might be the preferred approach by many. So adding another possible bug creating area does not seem appropriate?
Not everywhere :-). All I have pointed out here is adding consistency to control structures, because they are the only language constructions impacted by optional brackets.
I very well understand that spreading optional brackets to the entire langage is not a good idea. I have never mentioned this possibility.
Cheers.