@FlorianMargaine Well in your example we could tell you at compile time that your code sucks and you should feel bad and based on that not even bother to compile it ;) See, strict types can completely optimize your code away :P
@FlorianMargaine I'd say that, essentially the difference is in how often the AOT/JIT compiler will have available reliable type information and what kind of code it needs to generate if it doesn't.
@FlorianMargaine E.g. by using type backpropagation from the callsite of a function with known strict types, you will know what type a variable must have in order to not trigger an exception. You will be able to insert a guard for this at one place and assume the type everywhere else. With weak types you will have to generate code that can handle all possible types for the variable everywhere it is used.
hm wondering if i should write a mail thread about the game theory of the two RFC votes on the same topic
first mover looses imho
it will be 50/50 split now, so no RFC gets more than ~50% votes, however since everyone wants some kind of type hints, the last proposals will get the "i dont care give me type hints" camp again, pushing it over 66% ;)
I'm very much in favor of tweaking the zpp behavior in a few places (like wrt numeric strings with trailing chars), but just completely changing things, wtf.
@CarrieKendall Not really. I pass three variables (var1, var2, var3) to my twig template that I want to access depending on a variable. Imagine I have {% set p = "var1" %} // I'd like to actually use var1 depending on p
that's because i wanted to show that there's no meaning to repeat the abstract function since it doesn't enforce anything, so class B already has the abstract method and overriding it or not makes absolutely no difference
forgive me for not being more familiar with php voting, but, what happens when there are multiple rfcs (with differing implementations) for the the same feature?
abstract class MultipleDatabaseTest() extends DatabaseTest{ public function testWithMultiple(){ $this->prepareDatabase(true); } abstract protected function prepareDatabase($wthMultiple = false); }
> I don't see how that would affect PHP 7 adoption at all actually. You can just disable E_DEPRECATED and your upgrade would be clean. Technically it would have to wait to PHP 8 before we change it to E_RECOVERABLE_ERROR, give users several years to migrate. Given we're talking about coercive rules and not strict rules, I actually don't expect that many failures (initial tests of Francois' patch results in 8% failures in our unit tests,
> and that's before tweaking the rules in any way (and apparently, at least some of them have to do with bugs in internal functions that can be easily fixed). It doesn't strike me as a worse migration than we did getting rid of magic_quotes or safe_mode. It can be done.
We migrated off of magic_quotes and safe_mode because we realized they were a mistake. Is he really saying we should make a mistake again because we can fix it?
@Dracony well you could simply give it the request, the request has a header bag, and so on, you don't need more than 2 or 3 arguments and it helps with testability and loose coupling