News for hackers. Stuff that matters.
Re:Modern PHP without a framework by nikita2206 on Sunday April 01, 2018 @05:35AM (#16727507)
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

Re:Modern PHP without a framework by snomad on Sunday April 01, 2018 @10:04AM (#16728308)
> PHP supports strict typing

Still missing types for object properties :(

Re:Modern PHP without a framework by tylerjwilk00 on Sunday April 01, 2018 @10:33AM (#16728474)
As a work around you can use a private member variable with type hinted setter and getter.
Re:Modern PHP without a framework by linoge on Sunday April 01, 2018 @07:35AM (#16727767)
Isn't proper type system and Java things that shouldn't ever be on the same phrase?