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

> A few things I listed because they're weird, not outright wrong, and I stand by those.

But a few things are weird to you but not some objective view of weird. Many of your points I didn't comment on are not unique to PHP at all (such as octal numbers)

> For the most part you've defended PHP's behavior as design decisions or offered workarounds.

You could say that unifying PHP error codes and exceptions is a "workaround" but the language provides specific support for it (The ErrorException class) so it's pretty much a standard pattern. The end developer has the choice of development style.

> PHP doesn't need a module system? What?

I have projects with thousands of files -- as someone else said, Namespaces and Autoloaders covers this.



Let me put it this way: Lisp hackers think that one of the major problems with Emacs Lisp is that it basically uses one big namespace for everything, forcing awkward naming conventions and contortions to avoid collisions. That is possibly the one part of any Lisp that works like PHP ... and the Lisp community pretty much universally agrees that it's a bad idea, not because it's like PHP, but because it's a bad idea.

Also you should check out what Alan Storm has to say about this: http://alanstorm.com/python_imports_for_php_developers

Mr. Storm is a crackerjack PHP developer: perhaps you will listen to him.


Of course one big namespace is a bad idea and everybody knows it. I'm not sure why that's relevant here. Namespaces was always the #1 requested feature for PHP.

PHP does things differently; you don't import things before you use them -- PHP loads modules/classes as necessary when they're used. If you don't use a class, it's not loaded.

Other features of PHP make things like "import *" impossible (or at least very expensive) but at the same time it's also much less necessary.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: