Re: Optional parameters without initializer

From: Date: Mon, 03 Dec 2018 20:19:05 +0000
Subject: Re: Optional parameters without initializer
References: 1 2 3 4  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969387100@lists.php.net to get a copy of this message
Hi! > This defence sounds a lot like the perennial requests to distinguish > an initialised variable from null. Except that it's not a request, it's actually what is already happening right now in the language. > discussion isset() on a plain variable. Varying a function's behaviour > on number of arguments fits very poorly into the language, and it I am not sure what "fits very poor" means - it's part of the language, and has been for decades. Just declaring after 20 years "no, I don't like it, let's change everything now" is not going to work. PHP has functions that do different things depending on the number of args, and that's a fact which *is* part of the language. > What I am saying is that on a case by case basis, we should examine > these, and reluctantly keep only those that are too hard to change. And "too hard" should mean "causes any BC break". -- Stas Malyshev smalyshev@gmail.com

« previous php.doc (#969387100) next »