On Wed, 12 Apr 2023 at 09:24, Nicolas Grekas
<nicolas.grekas+...@gmail.com> wrote:
>
> I would like to see a similar benchmark with function autoloading enabled. 
> https://github.com/phpbenchmarks/

Can you point me to where one can tell the benchmark framework to use
a custom version of PHP?

> One of the big differences you'll see between PHP 4 and PHP 5 codebases is
> the number of source files - when people had to manually list each file to
> include, they tended to bundle things into larger categories;

Yes.

Or to put it more generally, the ergonomics of using a language (aka
the developer experience) affects how people think and write code. I'm
just going to quote someone from Reddit and my reply, because it
captures the essence of the situation perfectly:

TheBroccoliBobboli wrote in /r/php

>> I'm struggling to see the advantages of this vs working with static
>> class functions, e.g. Helper::function().
>>
>> That's mostly because I can't even remember when I last declared a
>> function outside of a class in any serious project though.

> Danack wrote:
> That the ergonomics of using functions in PHP is currently so bad, that you
> don't use them, is proof enough of why the ergonomics of using them needs
> to be improved, and autoloading is the most obvious improvement.


Nicolas Grekas wrote:
> Then comes my second main question: what does this solve?

Or, to appeal to a higher authority: "There is this one thing that I
noticed recently and that concerns me: PHP devs don’t use functions."
- Nikita Popov 
https://www.npopov.com/2012/08/10/Are-PHP-developers-functophobic.html

Nicolas Grekas wrote:

> It doesn't enable anything that a script generating a list of include
statements couldn't

Exactly the same argument could made against class autoloading.

cheers
Dan
Ack

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to