News for hackers. Stuff that matters.
Re:PHP 7 deployment at Dailymotion by wwweston on Friday October 14, 2016 @01:10PM (#12709514)
> The last part is why this is a problem.

$_POST isn't the problem. The scope of the variable isn't the problem. You've realized this, too, and that's why you're shifting the argument to one about typing instead of superglobals-are-bad (typing and scope are obviously independent features).

> You want to reduce the number of things you have to think about to the absolute minimum

The net effect of type systems seems to actually be to force you to think about a larger number of things very very carefully. The only thing that ends up being reduced is having to think about having to think about them.

Re:PHP 7 deployment at Dailymotion by nilliams on Friday October 14, 2016 @04:46PM (#12710975)
Parent did not 'shift the argument to one about typing instead of superglobals-are-bad' as I read it.

They said superglobals are bad because they make it too easy to do the wrong thing.

And the followup was about how often people do the wrong thing.

If you interpreted that any other way you misread (afaict).

Re:PHP 7 deployment at Dailymotion by Aaargh20318 on Saturday October 15, 2016 @04:55AM (#12713294)
>> The last part is why this is a problem.

> $_POST isn't the problem

No, it isn't. That's why I specifically said "The last part is the problem", referring to "as long as you're doing proper checks."

Specifically, my point is that you should not rely on people 'doing the proper checks' because people make mistakes, thus you want to reduce the amount of situations where people are given the opportunity to make those mistakes.

There are a lot of situations in PHP where you need to 'do the proper checks' for no reason other than bad language design, and that is what makes PHP a bad language.

Re:PHP 7 deployment at Dailymotion by berdario on Friday October 14, 2016 @02:50PM (#12710262)
> typing and scope are obviously independent features

You might want to read about effect systems

http://rtpg.co/2016/07/20/supercharged-types.html

(it might not be the best blog post on the subject theory, but I think it's a nice practical example)