Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> "::" wouldn't work, because it's ambiguous at compile time.

Why is "::" ambiguous at compile time? It seems to me something is rotten here. C++ using :: for both namespaces and static access of classes. Why didn't PHP go the same way?

I never complain about the choice of operator, I complain about it's need to exist in the first place. :: would have done the job just fine, just as it does in C++, which is where they stole it from in the first place.



For some reason the PHP developers think it should be Ok to have a class in your code with the same name as a namespace you're using. I just tested this out with Python and it seems that doing the same thing simply gives you what was last defined, so if you have import lib and then class lib you will just end up with lib as being the class.

Frankly, it's insulting to me that the PHP team doesn't think I have the skills needed to not name my classes after namespace I imported.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: