PROPOSAL: new class entry for grouping functions, consts and vars
| From: | kuzuha | Date: | Fri, 20 Sep 2013 06:13:50 +0000 |
| Subject: | PROPOSAL: new class entry for grouping functions, consts and vars | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-69242@lists.php.net to get a copy of this message | ||
Hi, I wrote a *rough* patch to add new class entry "definition" for
grouping functions, consts and vars.
https://github.com/kuzuha/php-src/compare/feature;definition
As you know, defining a lot of constants makes php slower.
I think autoload is very nice solution to avoid that problem.
Autoloading skips unnecessary code and makes php faster.
The "definition" block means Grouped defines. That gives autoloading
to function, consts and vars. And PSR-0 helps simplify directory tree.
Pros:
* Never mind where to put .php file for definitions. Following PSR-0 is
nice idea.
* Can refactoring definitions without hesitation.
* Separate implementation from definition specifically.
Cons:
* Big impact to language.
How do you think about this?
I hope I'll get your feedback.
Best regards,
Kuzuha SHINODA<kuzuha01@gmail.com>