You might want to revisit PHP. It is getting better with every release. We have enums, match expressions, union types and much more now!
As for the type system, haven't worked Hack but I absolutely love the gradual typing experience that PHP offers. Yeah, we had some things that could not be expressed but they are slowly being added, again we have finally union types!
I would even say PHP might be the only mainstream language that offers a first class gradual typing experience.
In Python your type hints are a lie as they are not enforced at all and different linter will give you different results and there is no standard.
In JS, you have to use a whole other languages that compiles down to it, slowing you down with an extra compile step.
Meanwhile PHP just works. Just use PHPstan for linting but even if you don't you get at least runtime checks.
PHP might get better. But currently every new PHP release breaks compatibility with some things extensively used in old code bases. It's so much work! I wouldn't use it for new projects just because of that.
PHP tends to be remarkably conservative in this regard. Things which are scheduled to be deprecated will typically just throw a warning for a major version or two before being removed entirely, and the migration documentation is very thorough for each major and point release. Yes, the older a code base is, the more of a pain it will be to migrate it to work with a major release without warnings, but that sort of technical debt will be the same regardless of language.
I don't think that is true sadly. I have never seen a change as offensive as https://www.php.net/manual/de/function.implode.php, where they simply swapped the parameter order of a core function. That is not conservative.
For other languages, Ruby for example feels a lot more stable. I'd expect that tcl, perl and most lisps are as well. But in fact I am still searching alternatives for the times I don't want to use ruby.
They swapped the parameters (after a long period of either order being valid, then the old order being deprecated) to more closely match those of explode(). It was a bug fix if anything; the old form should have been more "offensive" than the change.
It broke programs for some sense of aesthetics. First rule of infrastructure is to not do that, like Linus' "Don't break userspace" command. By definition that can't be a bugfix.
I don't know if it's changed recently but that's something I really appreciated when I wrote PHP: it was unabashedly singular in it's purpose as a web scripting language. The source article talked about VB6 as being a language where the GUI was a first class thing; for PHP the only focus was on making applications around web requests. No useless bloat while trying to be a general purpose shell scripting language; no delusions of grandeur of trying to be an enterprise business logic tier language... it did it's one task, did it well, and left other languages to other tasks. I think we would be better served to have languages will small standard libraries focuses on specific tasks rather than gigantic one-language-to-do-everything but about which nobody could possibly know everything (ahem C# ahem).
> 1. Pretty much everything is request-scoped. This makes it a lot harder to leak resources when everything is torn down;
I write PHP every day (just took a break from that to be here) and the request scoped content is both a nice thing and a pain in the ass some times. It's great that each request is on it's own - really handy for cleanup like you mentioned. There are some thing I want to be shared though, like a DB connection pool, a caching layer (one layer below my Redis layer), and clients for various other services.
Not the end of the world, but an example is AWS Secrets Manager libraries for Python support secrets caching, but they can't offer that in PHP since we won't be able to share the objects. You can use the file system, but that comes with its own hosts of quirks.
That said, PHP really is a fine language. I'm personally not a fan of the use of truthy/falsy values, but they've really dove head first into solid type support. Lot's of good progress has been made with it.
I hadn't seen this before, but I'll absolutely look into this, thank you!
As for why AWS doesn't use it (if that's your question), I assume they didn't want to deal with the need for a system dependency also. That's something that is kind of a pain to me with PHP as well. Some PECL, some Composer makes mentally tracking and managing deps a bit trickier.
To be clear, I like PHP. It actually has many attributes that make it almost ideal as a Web development language, most notably:
1. Pretty much everything is request-scoped. This makes it a lot harder to leak resources when everything is torn down;
2. A stateless functional core. This avoids a lot of class loading that has dogged Java (as one example);
3. No ability to start threads. This is actually a positive. Most application code should avoid creating threads like the plague.
But PHP comes with a lot historical cruft. It's type system is also primitive (Hack is a better example of this).
Where I think this could really shine is in data analysis (ie the numpy/scipy realm).