TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Taking PHP Seriously

208 点作者 kmavm超过 11 年前

22 条评论

flebron超过 11 年前
I really liked this talk.<p>PHP was my first language when I was starting out professionally, and before I went into university and learned &quot;proper programming&quot;. Back in 2007-2008, I remember the mess it was, with the internals list being a permanent struggle to implement anything by consensus (no lambdas or JS array notation because it wasn&#x27;t easy to google, for example), and it really did look like a dead end. The internal source code of PHP was often a mess of macros everywhere, and the whole PHP6 unicode fiasco really did paint a grim picture of its future.<p>Facebook seems to have given it a bit of fresh air, implementing some pretty interesting stuff (Hindley-Milner with subclasses, for instance), and it really seems like the &quot;feel&quot; of programming in PHP has changed. I&#x27;m not going to say &quot;Screw C++ and Haskell, _this_ is a serious language!&quot;, but on the other hand I feel I can say with a straight face to someone who is starting programming, &quot;You could check this language out&quot;, without a guilty conscience that I&#x27;ll be ruining their mind.<p>I&#x27;m unsure of PHP&#x27;s future - if it&#x27;ll be tied to Facebook (and thus Facebook&#x27;s future, which I am equally unsure of), for example - but as of now, it seems to be a reasonable, if idiosyncratic, language.<p>So yeah, good talk :)
评论 #7054932 未加载
评论 #7056336 未加载
评论 #7055207 未加载
评论 #7056377 未加载
SCdF超过 11 年前
At my job I maintain some PHP that we are slowly removing (and replacing with Scala for the backend and Angular for the frontend). My total experience with PHP prior was writing a tiny wordpress plugin a decade ago that added some anti-spam stuff to comments.<p>And you know, PHP, it&#x27;s not so bad. It gets the job done, it deploys instantly (the rest of our code is mostly Scala. Oh. My. God. Just. Build. Already…). It can be pretty haphazard, you can do some funky stuff with it (the abilty to pass by reference on integers and other &#x27;primitives&#x27; caught me by surprise) and I wouldn&#x27;t pick it for new code, but it&#x27;s certainly not the steaming heap of evil that people make it out to be.<p>Maybe our code is just awesome, idk.
评论 #7055618 未加载
评论 #7056262 未加载
评论 #7054940 未加载
camus2超过 11 年前
Interesting talk , curious about Hack.<p>PHP is a horrible language with great libraries and a few good features. A lot of successfull projects are written in PHP. The execution model is good enough for some types of apps(blogs,e-shops,...).<p>As a PHP developer , i&#x27;m betting on Python and NodeJS for the future, i dont believe PHP has any real future outside a bunch of popular CMSes. While PHP has excellent libraries (Symfony,Doctrine,...) , Python has very good ones too, and it IS trully multipurpose.<p>When i first came to Python i did not like its OOP model(no interfaces,...),but Python metaprogramming features are unique and very interesting to learn.<p>The biggest problem with PHP is its core developers, adding some &quot;feature&quot; is not fixing the language. Removing the bad parts should be the focus of the next PHP versions. It is not.
评论 #7055416 未加载
评论 #7056119 未加载
nikcub超过 11 年前
slideshare link, for those who want to avoid the InfoQ marketing signup maze:<p><a href="http://www.slideshare.net/zerutreck/taking-php-seriously-keith-adams" rel="nofollow">http:&#x2F;&#x2F;www.slideshare.net&#x2F;zerutreck&#x2F;taking-php-seriously-kei...</a>
评论 #7055861 未加载
评论 #7055189 未加载
anuraj超过 11 年前
I came to PHP after long stint with C, C++, Objective C, Java and Javascript - and I was productive from day 1. I have programmed extensively, and have come across few quirks, but never got stuck, nor is my code spaghetti. I do not use frameworks where they can be avoided and write extremely simple code and avoid OOP for scripting. I would not do OOP with a language without strong typing. My take is for short lived HTTP requests which need to spew out some JSON preferably(favor headless coding for frontend), PHP is the apt tool. For heavy lifting, use a strongly typed language which can easily handle complexity.
评论 #7055179 未加载
girvo超过 11 年前
God-damn.<p>I just spent the last week working on a new language that... turns out, is basically Facebook&#x27;s new language: Hack. Although, it does seem they&#x27;ve not released it to the public, so I suppose I&#x27;ll keep working on it, heh.<p>My new language steals PHP&#x27;s &quot;shared-nothing&quot;, &quot;bootstrap from nothing at request&quot; but steals Typescript (and Hack&#x27;s, apparently) gradual typing system, along with a saner, less ridiculous StdLib.
评论 #7056260 未加载
评论 #7054969 未加载
jimmytidey超过 11 年前
I love that he says &quot;if you are a person like me, who is a c++ compiler, I mean c++ person&quot; (16.20)
评论 #7056516 未加载
评论 #7054635 未加载
评论 #7054617 未加载
joeblau超过 11 年前
PHP is a strong language for the web, but the community is not. I really only see Facebook pushing the language and even though Steve Ballmer has been memed to death about his &quot;Developers&quot; rant, the developer community is really what makes languages like Ruby&#x2F;Rails and Node.JS more attractive.<p>I definitely applaud all of the work the Facebook team has done in order to push the limits of PHP and turn it into something that developers are actually comfortable working with. With that being said, I still don&#x27;t think it&#x27;s better than I thought it was.
评论 #7055786 未加载
dkhenry超过 11 年前
This is not about taking PHP seriously. This is about taking Facebooks internal development language _based_ on PHP seriously. By the time you factor in a different run time and the various language extensions they have made you no longer have PHP. In fact everything they have done has been to turn their existing PHP codebase into a better language and to their credit they have added some excellent tools to make that migration smooth. The question is at what point are you no longer writing PHP but writing facebook PHP with a VM that still lacks documentation and in the name of backwards compatibility carried forward the warts of the old PHP.
评论 #7060348 未加载
martin_超过 11 年前
Hack sounds pretty awesome, it&#x27;s strange I haven&#x27;t seen mention of that alongside hip hop before - also he mentioned &quot;hacklang.org&quot; but that seems completely different
评论 #7054774 未加载
mitchtbaum超过 11 年前
Whoah! Thank you for linking to this video series. Another video from this Strange Loop 2013[0] conference is on Symmetry in Programming Language Design[1]. I am finding it to be way more up my alley.<p>[0]: <a href="http://www.infoq.com/strange-loop-2013/" rel="nofollow">http:&#x2F;&#x2F;www.infoq.com&#x2F;strange-loop-2013&#x2F;</a><p>[1]: <a href="http://www.infoq.com/presentations/noether" rel="nofollow">http:&#x2F;&#x2F;www.infoq.com&#x2F;presentations&#x2F;noether</a><p>Edit: Posted to <a href="https://news.ycombinator.com/item?id=7054815" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=7054815</a>
jhh超过 11 年前
I think this was a worthwhile talk. The speaker makes some interesting points about the importance of &quot;ergonomic properties&quot; of languages.<p>He convincingly explains why PHP was so succesful: Workflow (just hot reload), Concurrency (in the sense of &quot;shared nothing&quot; HTTP requests), and State (every request starts from a &quot;clean plate&quot;, which reduces long-time statefulness bugs if you know what I mean).<p>An interesting point he raises is that PHP leaks it&#x27;s GC mechanism to the API, which makes implementing a fast VM harder for the HHVM team.
dscrd超过 11 年前
Generally a good talk and a good defense, but I didn&#x27;t quite appreciate his new definitions of &quot;State&quot; and &quot;Concurrency&quot;.<p>And did he really compare a full operating system to Facebook&#x27;s web apps in terms of complexity? If that&#x27;s true, there has to be a <i>lot</i> of accidental complexity in FB.
apanonymous超过 11 年前
I haven&#x27;t currently moved on to learning PHP yet, I&#x27;ve been using Python quite regularly for the past few years and a lot of Java Script. PHP could possibly be the next language for me to learn.
dogweather超过 11 年前
Does it attempt to refute John Siracusa&#x27;s _dissertation_ on 5by5? That&#x27;s the first hurdle for any pro-php article.
评论 #7057716 未加载
pknerd超过 11 年前
A post I just made about what PHP has become now.<p><a href="https://plus.google.com/118197810020432218051/posts/17fNVWVju8D" rel="nofollow">https:&#x2F;&#x2F;plus.google.com&#x2F;118197810020432218051&#x2F;posts&#x2F;17fNVWVj...</a>
评论 #7058666 未加载
sefk超过 11 年前
Nice talk Keith. Honest, clear, and informative. Thanks.
puppetmaster3超过 11 年前
If you use PHP, you can&#x27;t CDN your HTML. If you use PHP, you can&#x27;t PhoneGap build your HTML.<p>I recommend pure HTML (and call API&#x2F;CORS). (Same is true of ASP, etc.). Pure HTML!
alien3d超过 11 年前
i&#x27;m waiting for other language as flexible as php.. write code without thinking error message.
评论 #7055732 未加载
chronomex超过 11 年前
Is such a thing even possible?
评论 #7054767 未加载
评论 #7054567 未加载
评论 #7054622 未加载
评论 #7054698 未加载
jbeja超过 11 年前
Yes, more PHP please!.
sudy超过 11 年前
I am a PHP developer and I like it