Re: PROPOSAL: new class entry for grouping functions, consts and vars
| From: | Lazare Inepologlou | Date: | Fri, 20 Sep 2013 07:47:18 +0000 |
| Subject: | Re: PROPOSAL: new class entry for grouping functions, consts and vars | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-69245@lists.php.net to get a copy of this message | ||
2013/9/20 kuzuha <kuzuha01@gmail.com>
> 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.
>
>
This is nothing else than a "static class" of C#, which does nothing but
enforcing self-discipline.
We can already do all these stuff with a standard PHP class. Besides, a
standard PHP class offers Late Static Binding, which gives a very nice
mechanism to expand a library. How does your "definition" block provide
anything similar?
Lazare INEPOLOGLOU
Ingénieur Logiciel