Re:Comparing the PHP 7 and Hack Type Systems
by echaozh on Monday April 27, 2015 @01:18AM
(#9444486)
Because PHP is for really fast development, and not for slow movers who actually think a lot. That's what I sense after joining a company using PHP.
The language itself feels like a bag of features copied over from top contenders from the TIOBE index. You can see the fastness in the core of the language design.
After all, you use PHP to perform MySQL queries in the middle of HTML tags. If you want to do this, you know some principles are merely burden for your smooth execution of the web site development, and should be throw out the window at first thought.
Re:Comparing the PHP 7 and Hack Type Systems
by stephenr on Monday April 27, 2015 @02:22AM
(#9444628)
Just because you can do something doesn't mean you should
The sort of approach you're describing is not suggested or used by anyone with half a clue what they're doing.
Re:Comparing the PHP 7 and Hack Type Systems
by slapresta on Monday April 27, 2015 @03:12PM
(#9448495)
Indeed, no one with half a clue what they're doing uses PHP.
We program so hard we don't have time to think. Or type. At least not with as many characters as a sane person would.
Re:Comparing the PHP 7 and Hack Type Systems
by TazeTSchnitzel on Monday April 27, 2015 @07:34AM
(#9445549)
In this case I don't think it sacrifices much clarity, and it avoids the word "typehint" which is controversial (correctness is disputed). Using TRUE wouldn't necessarily be more correct, it's fairly arbitrary.
This mindset is something that I've personally seen uniquely permeate every layer of the PHP community, more than anywhere else. I'm honestly curious, what makes communities seem to value things like typing less characters over clarity and correctness? The most important thing to me is reducing the amount of mental state needed for a human to read any line of code.