Monday, December 17, 2007

Thoughts for a new year: PHP as the new Java

If one manages to dig through all the noise on the PHP internals mailing list, there's a strange feeling of caution coming out of the core development team that, for some reason, just doesn't feel like it belongs in a PHP discussion list.

Historically, PHP has been developed following the scratch-an-itch method: someone has an idea, or needs something that the platform doesn't provide, comes up with a solution and either discusses it with the rest of the development team, or (in rarer cases, at least in the past) on the internals list and then posts it to the codebase.

This development process makes for some haphazard functionality, and has, in the past, been the source of many annoyances that need to be handled with extreme care—both in how they are fixed and in how they are maintained for backwards compatibility.

However, some of what are arguably PHP's most interesting and features have also been born out of this very same system—for example:
  • Object orientation in PHP 4 were added almost as an afterthought, and it showed. Despite the many problems that they caused, however, they also made PHP development worthwhile for many people and served as the main inspiration for the development of PHP 5, which, in turn, opened the door to many of the new features introduced by the latter.

  • SimpleXML was perhaps misnamed, still has a lot of limitations and required several point releases before becoming truly usable, but, at least as far as I'm concerned, it's what makes XML manipulation tolerable in PHP 5. Without it, we'd be stuck with DOM, which, despite using the same underlying functionality, requires, oh, three times as much code.

  •  Type hinting has, more than once, saved my behind. It took it a couple of minor adjustments (e.g.: allowing passing NULL and supporting arrays) before it became truly useful, but without it we'd have a much poorer language from a maintainability perspective.
Overall, the spontaneity with which PHP has been developed in the past is a combination of sheer recklessness ("I'll commit and deal with the consequences later") and a process of discovery that improves what is worth improving, while letting the rest wither (but, unfortunately, almost never die).

The recent discussion about namespaces is a clear example of what is wrong about PHP today: not the endless discussion on internals, not the noise-to-signal ratio, but the fact that someone isn't willing to just jump the gun, commit and let the chips fall where they may. If we continue down this road, I'm afraid that one day we'll wake up and find ourselves dealing with the new Java: all decisions made by committee, and innovation dead, somewhere in the corner with no-one to care.

13 comments:

Toby said...

Very good point!

Cheers!
Toby

cloveless said...

The scary thing is: some people (too many, I fear) would consider "PHP as the new Java" A Good Thing. Is it any wonder that PHP is bleeding users to Ruby?

Marc said...

Cloveless... Is PHP bleeding users to Ruby? Iv'e not seen any evidence to support this at all - PHP is still the defacto standard for scripting languages, there are now more and more competant PHP programmers.

Even if PHP is losing users to Ruby if it is - is it due to the noise-to-signal ratio on the PHP internals mailing list? Or because its harder for the developers of PHP to commit maverick patches to CVS and get an idea accepted as part of the PHP core? Highly unlikey.

cloveless said...

I have no hard data to back this up, but most of the Ruby and/or Rails using developers I encounter are former PHP coders.

That both Ruby and Rails are largely the result of individual vision and execution is worth noting, as the racket surrounding PHP grows louder and more committee-based.

There is a great deal to be said for the "Benevolent Dictator" approach when it comes to open source. Doesn't work for every case, but when the opposite takes hold -- high noise-to-signal, etc -- it oozes out into the larger community in ways that are difficult to measure, but cannot be ignored.

Just because it can't be measured, it's unwise to think that the hostile environment surrounding the PHP core has no effect.

For example: let's say the senior developer a Company X is in the loop on the challenges that come with the "upper echelon" of the PHP world. He finally gets fed up and mandates a switch to Rails. Given his clout, no one objects -- and a PHP shop becomes a Rails shop.

Mid-level and junior developers make the switch as well, and if they like what they've switched to, tell their friends. And so on, and so on.

The entire community doesn't have to be exposed to the problematic core. It just takes turning off one influential developer to create 20 Rails converts.

Highly unlikely? I'm not sure. I don't dispute that PHP continues to be the dominant scripting language, and I'd like to see it continue to hold that position. That said, Rails is picking up its rabid fans from someplace, and I don't think there are enough ColdFusion switchers to have made this much noise. :)

valugi said...

It sure seams that somebody is pushing Php further and further towards Java. At first it was OOP, now will come the framework and eclipse and only Java developers know what next. Maybe Zend as the main sponsor in PHP these years wants to reach to a profit fast for it's investors, and for this they need a complicated high level language. I say that the scripting days of php are long over. Will have to get "certified" asap.

savaşoyunları said...

savaş oyunları
savaş oyunu
3 boyutlu oyunlar
silah oyunları
dövüş oyunları

Anonymous said...

徵信, 徵信社, 感情挽回, 婚姻挽回, 挽回婚姻, 挽回感情, 徵信, 徵信社, 徵信, 捉姦, 徵信公司, 通姦, 通姦罪, 抓姦, 抓猴, 捉猴, 捉姦, 監聽, 調查跟蹤, 反跟蹤, 外遇問題, 徵信, 捉姦, 女人徵信, 外遇問題, 女子徵信, 外遇, 徵信公司, 徵信網, 徵信, 徵信社, 外遇蒐證, 抓姦, 抓猴, 捉猴, 調查跟蹤, 反跟蹤, 感情挽回, 挽回感情, 婚姻挽回, 挽回婚姻, 感情挽回, 外遇沖開, 徵信, 徵信, 徵信社, 抓姦, 徵信, 徵信社, 外遇蒐證, 外遇, 通姦, 通姦罪, 贍養費, 徵信, 徵信社, 徵信社, 抓姦, 徵信社, 徵信社, 徵信, 徵信, 徵信公司, 徵信社, 徵信, 徵信公司, 徵信社, 徵信社, 徵信社, 徵信社, 徵信社, 徵信公司, 徵信社, 徵信, 徵信, 徵信公司, 女人徵信, 外遇, 外遇, 外遇, 外遇

徵信, 徵信網, 徵信社, 徵信網, 徵信, 徵信社, 外遇, 徵信, 徵信, 徵信社, 抓姦, 徵信, 徵信社, 外遇, 徵信社, 抓姦, 徵信社, 徵信公司, 徵信, 徵信社, 徵信公司, 徵信, 徵信社, 徵信公司, 徵信社, 徵信社, 徵信社, 徵信社, 徵信, 徵信社, 徵信社, 徵信社, 徵信,

Anonymous said...

~「朵語‧,最一件事,就。好,你西中瀟灑獨行。

bingyi said...

The latest hair style |
The most popular wedding |
The world's Wedding |
Popular wedding |
Personalized Wedding |
Personalized Wedding |
Miss World |
Fashion Daren |
Shoutui weight loss |
Shoutui weight loss |
Crosstraining, freeclimber legs by law |
Fashion Daren |
Hollywood film |
Hollywood film |
Hollywood star |
Hollywood star |
Hollywood star |
Hollywood star |
Hollywood star |
Hollywood star photos |
Slimming diet |
Slimming diet |
Popular hairstyle |
Popular hairstyle |
Slimming diet |
Fun games |
World luxury cars |
Hair design |
World luxury cars |
Fashion designer |
World model |
World model |
World model |
Popular wedding |
Popular wedding | . | . | . | . | . | . | . |. | . |

month128 said...

嘻哈論壇|
Taiwan City|
you tube中文版|
skype中文版下載
kmplayer繁體中文版
迅雷5下載
bt程式下載
cs1.6主程式下載
winrar免費下載
nds遊戲下載
KMPlayer下載
無蝦米正式版xp
海賊王漫畫連載
emule繁體中文版
directx9.0免費下載
office 2007下載
無蝦米vista正式版
爆爆王無敵程式
rmvb播放程式下載
遊戲天堂楓之谷
生份證產生器
最新線上遊戲排行榜
photoimpact下載
kmplayer繁體中文版
戰鎚online官方網
sao突襲online=========================================

month128 said...

=|===================|=|=|=|=|=|=|
=|=|=|=|=|

moto said...

不動産
合宿 免許
網頁設計
ショッピング枠 現金化
クレジットカード 現金化
キャッシング
治験
フロント 仕事
幼児教室
名刺

夏天 said...

搬家搬家搬家公司 搬家搬家Shade sailnike shoesMBA在职研究生 在职博士徵信社 徵信室內設計室內設計代償房屋貸款信用貸款外遇離婚抓姦外遇蒐證外遇抓姦侵權仿冒應收帳款工商徵信徵信 徵信社外遇徵信徵信社外遇电动隔膜泵自吸泵化工泵离心泵磁力泵螺杆泵水泵隔膜泵气动隔膜泵百家乐 轮盘 21点 德州扑克 百家乐系统 真人娱乐场 百家乐足球德州扑克 电子游戏 英格兰超级联赛 德国甲组联赛 意大利甲组联赛西班牙甲组联赛法国甲组联赛欧冠杯 英超 足球比分 足球彩票 体育彩票 即时比分 免費a片 a片 免費av 色情影片 情色 情色網 色情網站 色情 成人網成人圖片成人影片 18成人 av av女優 avav女優 情慾 走光 做愛 sex H漫 情色 情趣用品 情色 a片 a片 成人網站 成人影片 情趣用品 情趣用品アダルトアダルト アダルトサイト アダルトサイト 情趣用品搬家搬家服務搬家保障搬家網搬家估價徵信徵信的意義徵信服務徵信報導徵信問答徵信知識婚禮佈置 婚禮佈置
http://www.life13.com