Hacker News new | ask | show | jobs
by chaosfox 5000 days ago
Its a syntax problem then ? what if the annotation wasn't inside comments would that make it ok ?
2 comments

I think yes. It's ok if it's not inside comments. Just like any other language (I know at least C# and Java do this for example).
A lot of this boils down to PHP's feeble "array" declarator. Take a page from JavaScript and make it easy.
As of PHP 5.4 you can use [] to define arrays. It saves some typing, and is less noisy on the eyes I guess.
That's exactly the way it should be. Hopefully this will become the standard before long.