On Fri, Jun 5, 2020 at 7:52 PM Sara Golemon <poll...@php.net> wrote:

> This is a perennial topic and I don't want to discourage you,BUT...
> run-tests.php has a disturbing number of modes and edgecases, and the
> preference has traditionally been for small movements which are easily
> understandable individually.
>

That's why it's being done in a separate repository and every commit is
tested to work. But yeah, once I get around to adding tests, suggestions of
more things to test for will be appreciated.

On Fri, Jun 5, 2020 at 8:04 PM Nikita Popov <nikita....@gmail.com> wrote:

> Happy to accept run-tests refactorings in general (there is a lot of
> global state to eradicate!), but please keep it single-file. We definitely
> need it single-file for distribution purposes, and I don't particularly
> want to have a "run-tests build system" for what I perceive to be little
> benefit.
>

Once I add tests, it will just not be a single-file project anymore.


> I'm not sure why PHP developers in particular seem to be so hung up about
> this issue, but: There really is no need to split every class into a
> separate file. This is how we develop in non-PHP, non-Java languages
> (C/C++/Rust/...) all the time.
>

<philosophy>Because PHP taught them to: can't have a serious project
without the autoloader, can't have a sane autoloader without per-class
files (PSR-4 is as it is not due to its developers' preferences, but
because it was the most reasonable thing to do). If only there was a way
for classes to be automatically and seamlessly located from PHP core
itself...</philosophy>

My split into multiple files wasn't dogmatic, but purely pragmatic: a 3722
line file is too big for my liking (as in, it's too hard to find my way
through it, even if the code is organized neatly into classes), and the
number of lines will only grow. Also, it's way easier to have one tab per
class. =)

-- 
Best regards,
Max Semenik

Reply via email to