But I really like compilers, they catch a whole class of bugs, before I run things.
But I really like compilers, they catch a whole class of bugs, before I run things.
I can't imagine not having Psalm or PHPStan in our build pipelines.
There are tools for creating stand-alone executables from PHP source code, but they're not as nice to use, compared to languages that were designed for this. By distributing software I also mean making your latest code live in prod.
I suppose the benefit of using PHP (or other interpreted languages) is that it's easier to create "plugins", just copy the new source files to the server.
Also, out of curiosity, are all of those tests hand written, or is there some generation in there?
I can’t see how static analysts could solve it really.
nobody wanted to write tests to ensure that something would compile... let alone tell you what 'type' an object was. i can't tell you how many hours i wasted watching my pair trying to figure out what 'type' an object was, by using `print`. luckily i was working as a very expensive consultant.
of course these things could be bolted onto ruby, but it never felt natural. running 40k tests to see if something compiles is absurd, takes forever and results in super brittle tests that have to be reworked when code changes. often people would use meta programming in the tests, which only made figuring out the errors even harder since the line numbers would be all wonky in traces.
sorry you're saddled with that legacy of well intention and poor execution.
Oh and the garantiert that no one can modify it post the compile step.