3 ms·
I'm going to ignore the Ferrari Civic.. Real type system -> PHP has one. Static analysis is possible in PHP. Sublime, PHPStorm and VS Code are not high quality
by dncornholio 5y ago
I'm going to ignore the Ferrari Civic..
Real type system -> PHP has one. Static analysis is possible in PHP. Sublime, PHPStorm and VS Code are not high quality? Zend Framework, Symfony, Laravel are pretty high quality frameworks IMHO
- jpgvm 5y agoIt doesn't have a real type system. It's dynamically typed under the hood, type declarations are just hints in PHP, the code will fail at runtime not compilation time. Compare this to prod languages where your build with just flat out fail, you don't even need to run the tests! It will just tell you X var is not of type Y, try again. There is some minimal static analysis. Nothing in the realm of what is available for production languages. PHPStorm/Webstorm are decent yes, IDEA platform is pretty awesome in general but if you think those are good wait until you try IntelliJ or Rider w/Java or C# respectively. There is good reason why it's those 2 editors that made Jetbrains into the company they are today. (Note that these too are written in Java and Kotlin... which should also tell you something) Zend/Symphony/Laravel are great for PHP, orders of magnitude better than what came before them, however they just don't measure up to Spring and ASP.NET in performance, correctness and tooling. This shouldn't be a surprise either, Spring has a long history of massive production users, everything that can be done has been done and the best patterns and libraries have been battle tested in the harshest of environments. ASP.NET has insanely large userbase because it's the only blessed framework on the Windows platform, which is way larger than the HN community gives it credit. It has insanely high level of consistency because of the massive scope of both the C#.NET standard library and the bundled functionality in ASP.NET and blessed libraries like SignalR. That is to say, can you use PHP for web? Sure you can, you can even build some great stuff. But unless you are invested in it already these other tools -are- better, objectively better, not subjectively. You can argue subjectively for Python, Ruby or Node.js - to me these are all in the same class as PHP and have similar quality frameworks (Django, Rails, Nest.js) but are all objectively inferior to the production languages. I don't even get why this is controversial tbh. I have used all of these, in fact I still choose to use some of them. I build things in Ruby occasionally, Python for some things and I started off doing web stuff in Perl and PHP. As someone with a background in all of these scripting languages I don't think it's possible without some crazy mental gymnastics to not see how the production languages are clearly superior for almost all professional use cases. I think the most likely case is people that think otherwise just have never tried them, at least not seriously enough to really grasp them.
- Zababa 5y ago> It doesn't have a real type system. It's dynamically typed under the hood, type declarations are just hints in PHP, the code will fail at runtime not compilation time. Just like Java then? Your average Java code will be more solid than your average PHP code of course, but Java is far from free from runtime errors due to a not good enough type system. > You can argue subjectively for Python, Ruby or Node.js - to me these are all in the same class as PHP and have similar quality frameworks (Django, Rails, Nest.js) but are all objectively inferior to the production languages > As someone with a background in all of these scripting languages I don't think it's possible without some crazy mental gymnastics to not see how the production languages are clearly superior for almost all professional use cases. What is even a "production language"? Lots of people are using Ruby, Python and Node in production, and it's working very well for them. > I think the most likely case is people that think otherwise just have never tried them, at least not seriously enough to really grasp them. That's a strawman. You seem to have a very black/white view about production vs non production languages, that mostly maps to "used by classical big companies", and that doesn't seem to reflect reality very well.