Hacker News new | past | comments | ask | show | jobs | submit login

I just saw some lines from GAE for PHP and saw very inconsistent and not quite code.

All modules use require_once... well, well...

And other many issues...

But looks as massive code. Maybe translated automatic.




> All modules use require_once... well, well...

Why on earth is that a problem?


It's not necessarily a problem, but it's a smell. Modern object-oriented PHP development is done with autoloaders[1]: having to require_once every class file is unnecessary and brittle. It is odd that GAE doesn't provide its own autoloader for its provided classes, and I'd expect that to be addressed in the future.

[1]: http://php.net/manual/en/language.oop5.autoload.php



more refine answer: just use spl_autoload_register


yes its smell


without autoload its seems useless and as monster. Its seems as broken by design.


We don't use autoload because it's slow and doesn't work with APC. Not rocket science.

http://stackoverflow.com/questions/4788452/does-autoload-rea...


??? this is not argument - spl_autoload very fast its allow only one call to load module - all developers use spl_autoload

APC its legacy and crappy as opcache. I think its smell from Zend. They stop (in old time) because their close ware Zend Studio must sell. And other get pain from that legacy. Im sorry.

check here for start: http://talks.php.net/show/w2e09


fixes:

more refine answer: just use spl_autoload_register


needs for speed can be satisfied




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

Search: