|61 earlier messages|
|Simon Schick||Feb 29, 2012 2:26 am|
|Lazare Inepologlou||Feb 29, 2012 7:26 am|
|Daniel Macedo||Feb 29, 2012 8:20 am|
|Richard Lynch||Feb 29, 2012 10:02 am|
|Kris Craig||Feb 29, 2012 11:06 am|
|Kris Craig||Feb 29, 2012 11:09 am|
|Kris Craig||Feb 29, 2012 12:18 pm|
|Zeev Suraski||Feb 29, 2012 1:09 pm|
|Zeev Suraski||Feb 29, 2012 1:49 pm|
|Arvids Godjuks||Feb 29, 2012 2:05 pm|
|Kris Craig||Feb 29, 2012 2:15 pm|
|Arvids Godjuks||Feb 29, 2012 2:24 pm|
|Zeev Suraski||Feb 29, 2012 2:26 pm|
|Kris Craig||Feb 29, 2012 2:33 pm|
|Derick Rethans||Feb 29, 2012 2:44 pm|
|Matt Wilson||Feb 29, 2012 2:46 pm|
|Kris Craig||Feb 29, 2012 2:46 pm|
|Kris Craig||Feb 29, 2012 3:53 pm|
|Kris Craig||Feb 29, 2012 4:05 pm|
|Kris Craig||Feb 29, 2012 4:55 pm|
|John Crenshaw||Feb 29, 2012 5:15 pm|
|John Crenshaw||Feb 29, 2012 5:16 pm|
|Adam Jon Richardson||Feb 29, 2012 5:55 pm|
|Kris Craig||Feb 29, 2012 7:00 pm|
|Richard Lynch||Feb 29, 2012 7:01 pm|
|Kris Craig||Feb 29, 2012 7:09 pm|
|John Crenshaw||Mar 1, 2012 12:37 am|
|John Crenshaw||Mar 1, 2012 12:46 am|
|Simon Schick||Mar 1, 2012 12:52 am|
|John Crenshaw||Mar 1, 2012 12:58 am|
|Pierre Joye||Mar 1, 2012 12:59 am|
|Lester Caine||Mar 1, 2012 12:59 am|
|Lazare Inepologlou||Mar 1, 2012 1:09 am|
|jpauli||Mar 1, 2012 2:58 am|
|Kiall Mac Innes||Mar 1, 2012 3:10 am|
|Anthony Ferrara||Mar 1, 2012 10:06 am|
|John Crenshaw||Mar 1, 2012 11:36 am|
|John Crenshaw||Mar 1, 2012 4:17 pm|
|Kris Craig||Mar 1, 2012 5:22 pm|
|Simon Schick||Mar 2, 2012 1:09 am|
|Ronald Chmara||Mar 2, 2012 3:13 am|
|Subject:||[PHP-DEV] PHP Philosophy (was RE: [PHP-DEV] Scalar type hinting)|
|From:||Richard Lynch (ce...@l-i-e.com)|
|Date:||Feb 29, 2012 7:01:51 pm|
On Wed, February 29, 2012 7:16 pm, John Crenshaw wrote:
I'm beginning to think that the type hinting question is too closely related to the dirty secrets of type juggling to resolve them separately. You may have to either discard consistency, or else fix the problem of silent bizarre conversions at the same time ('foo'==0, '123abc'=123). Fixing the conversions is a BC break though.
[short version] One man's "fixing" is another man's "feature" :-)
Old hands can now hit delete while I wax philosophical.
PHP does the type juggling because HTTP data is all string. It's a feature, because PHP's main purpose was to process HTTP input. [Yes, I know you did not dispute this. It's just foreshadowing...]
Once one accepts the premise that automatic type-juggling is "good", the idea that (int) "123 abc" turns into 123 may seem incredibly "wrong" or "right" depending on how useful one has found it.
I have found it useful, and others have as well, to the point that we don't consider it something to "fix" but a "feature"
Obviously, others disagree. And that's okay. We "get" that some disagree, and even why some disagree. We've all coded in C, C++, C#, Forth, Modula 2, Lisp, PL/1, and many more, collectively.
We choose PHP, at times, because it is the way it is, as "broken" as it may seem to others. And they are legion. One only needs to review blogs and mailing lists of fans of other strictly-typed languages to see this.
But Breaking Compatibility with something so deeply ingrained in the culture and language, which goes back consistently at least to PHP3, and probably PHP/FI, is a non-starter.
There are probably literally millions of scripts that will break "out there." That's simply unacceptable, and I trust you understand why that is so.
You might consider those scripts poor programming practice. We all do. But PHP is the language of the unwashed masses, and that was, and is, part of why it is hugely popular. Somebody who barely understands programming can pound away at the keyboard and write a bloody useful web application, breaking 10,000 Computer Science rules along the way.
It's duct tape and bailing wire. And we love it for that.
If the app is useful enough, it might even get cleaned up. Or just more duct tape and bailing wire is applied, more likely. :-)
Even at a major release, PHP has, by and large, strived to remain Backwards Compatible, unless a VERY compelling reason was presented.
A vocal minority, or even a majority, of developers does not qualify. That's pretty much why the Core Devs' "veto" power exists.
Some of the proposals and ideas lately have adhered to that concept of not breaking Backwards Compatibility. Others have not, and those are just non-starters.
But PHP core has always had the mantra "Keep It Simple, Stupid"
If one wants a complex language, PHP is simply not going to be it, and virtually all of these proposals do not fit the KISS principle, at a fundamental level of "Any idiot can read halfway decent code and puzzle out what it does in less than a day."
This is a Religious Issue, a personal preference, a philosophical ideal, etc. Right or wrong, it is what it is, by choice, by the core developers who have put years worth of effort into it.
Please don't read this as "go away" or a restatement of the arguments that have been labeled as circular before. I am merely trying to explain why PHP is the way it is, at a 10,000 foot level, and why so many core devs are resistant to the changes being proposed.
I highly respect all the efforts and the alternative philosophical differences, and even the guiding principles of Computer Science driving them. PHP is just not the language for Computer Science types, for the most part. It's for the masses.
Some CS types like it in certain situations, which is all to the good, or it would be a total mess :-) We embrace its "flaws" and ugly hacks because, like it or not, "it works" for what it's designed to do.
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php