Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: