Stas,
On Thu, Jun 27, 2013 at 1:18 PM, Stas Malyshev <smalys...@sugarcrm.com>wrote: > Hi! > > > > > I'm assuming that you do know the difference between > > E_RECOVERABLE_ERROR and E_ERROR. And the difference is not trivial... > Could you please explain what is the non-trivial difference relevant to > this case and how it is relevant? Could you also explain why making > undefined function produce E_RECOVERABLE_ERROR would not solve it? Well, changing undefined functions to E_RECOVERABLE_ERROR would make it easier to safely recover. But it still doesn't solve the coupling problem between multiple libraries. To quote Ralph here: > There's no doubt that large groups of developers in the PHP ecosystem are sharing code more now than I've seen in my 15 years in it. It would be nice if the engine would facilitate or simplify this kind of code-sharing in a way that our instanceof/is_a history and roots simply can't. changing undefined method to E_RECOVERABLE_ERROR (while likely good), doesn't do anything for that problem... > > But "good practice" vs "not-good-practice" shouldn't be a significant > > factor, because your "good-practice" is different from > In my opinion, it is the most significant factor. Good practices are > very important to the language, because they are what turns the language > into a community with common... well, language of expressing things. > Otherwise it is just an assembly of loosely related hacks. If we were talking about consistent good practice, such as those that were codified and agreed upon by the community as a whole, or as those determined by a BDFL, I could completely agree. Without either of those, it's just a biased and loosely assembled collection of "whatever-people-who-have-political-influence-want". Which is not what makes a good language or community... > > > > Those other languages (all of them in fact) throw exceptions if the > > function or method does not exist. PHP hard fatals. They > Here it goes again - the exception thing. If you want to make PHP throw > exceptions on errors, please write RFC on making PHP throw exceptions on > errors (I have no idea how it would help you, but you are welcome to > share it). Writing a different parallel typing system into PHP and > linking it to duck typing in other dynamic languages which explicitly > doesn't do what you claim it does and what your proposal does in not > right way to approach it. Other dynamic languages - excepting Scala and > couple of others, which are very unlike PHP in a lot of aspects > including static typing - demonstrably do not do what you want to do. So > if you say "look at other languages" - yes, we did and they call "duck > typing" exactly what I described, not what you described. No, my point was that you pulled the card "those languages don't have these structural typing thigns". And I showed one reason they don't. This argument is getting circular really fast... > > So if you don't see the usefulness of this type of change, ask if you > > maintain anything significant that fits that description. If you > > don't, find someone who does and talk to them. Otherwise you may be > > unfairly judging by ignoring problems that you personally don't have... > Thank you for your advice, in my 20+ year career in software development > and 10+ year career in PHP specifically I have has some experience with > all kinds of problems. Now if you would like to kindly move from "you > know nothing, Jon Snow" to more substantial arguments it'd be more > productive. > I think you very much misunderstood what that paragraph was supposed to mean. I don't pretend to know everything. I don't pretend to know every use-case. And I don't pretend to know the plights of every developer. All I know is what I experience and the experiences of those that I talk to. I have seen the usefulness here. And I know others have (they have expressed it here and in other channels). And I know you have had difference experiences. And if you don't see the usefulness, I was suggesting that *perhaps* it may be prudent to look towards those (other than myself) who have seen the problem. Someone like Ralph from this very thread. It's something that community leaders like us have to do. Branch out and realize that our own perceptions and viewpoints are going to be naturally biased by our experiences. And that's why I suggested reaching out to other community maintainers for some insight into what problems they face. It was most definitely not a "you know nothing" argument, and I hope that you know that. Anthony