3 ms·
The reason to use PHP over JS/Python or Ruby is that PHP supports strict typing and that makes code both more maintainable, understandable (Find Usage feature o
by nikita2206 9y ago
The reason to use PHP over JS/Python or Ruby is that PHP supports strict typing and that makes code both more maintainable, understandable (Find Usage feature only works reliably when types are inferrable which is not always the case in those other theee langs) and refactorable.
Now the reason to use PHP over Java or Go is that PHP at this point has a type system that’s on par with Go’s but at the same time it gives you an advantage of fast development process thanks to the lack of need for compilation and/or restarting the container after each change in the code. I’m currently working with Java and before that I had a long experience of PHP, while I personally would choose Java over PHP almost in any case because I value type system features perhaps a bit too much, but I do suffer from those slow turnaround times (compile/restart TomCat) and I can see how it could potentially be bad for the business at early stages especially.
So the bottom line is PHP at this point has a nice balance which is hard to find atm in any other popular languages with evolved ecosystem
- linoge 9y agoIsn't proper type system and Java things that shouldn't ever be on the same phrase?
- eitland 9y agoThat sounds really weird. Are you sure you are talking about the same Java? Because Java, for all its warts, is maybe the language that has done most to pave the way for mainstream typed languages.
- snomad 9y ago> PHP supports strict typing Still missing types for object properties :(
- tylerjwilk00 9y agoAs a work around you can use a private member variable with type hinted setter and getter.