by fiedzia · 10y ago · 0 comments
But there is also nothing particularly wrong with it. It may not be better, but it has no worse maintenance record, crash record, or accident survival rate then average car. (In software world, that would be perhaps java).
To come with better analogy - PHP is like a 15+ yo car imported from neighbour country because that's the only thing you can afford. Its popular and you'll see it all around in you area, so you may be unaware that better cars even exist. It can be used, but something breaks every 50km, the rust has eaten so much that any minor collision will get you killed, and you'll see people frantically repairing it with duck tape on every street to ever get home. But yeah, you can drive one. And have you heard that next year the tax will be lowered, so you may be able to afford 14 yo cars, life is getting so much better here.
Also PHP could easily add sane new stdlib if it wanted to, and keep supporting the old one as long as people want to. I just don't think anyone is really interested in doing so. Most PHP users don't care much, and few large companies that fund the work are mainly focused on keeping the ship from sinking.
What about Python ?
def foo(x:int) -> int: return x+1
to get hints in your IDE (though its not enforced yet by interpreter).