Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

Really? Namespaces aren't important for building large scale software? I'd argue that unless you are writing in C for a good reason, namespaces are absolutely a requirement for any-scale of software.

You can argue about closures and mixins, which are handy for people that know how to use them, but are not essential. But are you really going to argue against namespaces?

Ironically, the newer versions of PHP have most of those things, but most people who would care to use them left PHP years ago.



You can fake module naming with underscores (ugly but it works) and with duct typing you're only typing the full names of classes sparingly. In Java, the lack of namespaces would drive you insane, in PHP not so much. The lack of namespaces hasn't slowed down the development of very large class hierarchies in PHP -- just look at the Zend framework.

I'm not arguing against namespaces, I'm just saying for PHP they're more of a luxury than a necessity.


Mixins are actually kind of nasty; better to use Traits/Roles instead.




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

Search: