TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ending PHP Support, and the Future of Hack

429 pointsby dcgudemanover 6 years ago

24 comments

luordover 6 years ago
Another day, another weird dogmatic &quot;static vs dynamic&quot; discussion, with inaccurate comments like &quot;the dynamic hype is dying&quot;, or &quot;static is making a comeback&quot; or &quot;static is not really relevant anymore&quot;.<p>Are people really that unfamiliar with the history of computer science? There&#x27;s no hype, there&#x27;s no comeback; both static and dynamic languages have existed for over six decades. Both styles have been around as long as computer science has been a thing and will continue to exist as long as programming is a thing.
评论 #17979065 未加载
评论 #17980478 未加载
muglugover 6 years ago
I don&#x27;t think there are enough backend web developers in the world to support vibrant communities for both PHP and Hack.<p>Unless Facebook&#x27;s prepared to invest a lot in community-building, Hack and similar FB projects will go the way of VBScript and Silverlight.
评论 #17976260 未加载
评论 #17977447 未加载
评论 #17976697 未加载
评论 #17976138 未加载
wprapidoover 6 years ago
With PHP7, HHVM became largely irrelevant. It had played a great role and contributed to the PHP&#x27;s maturing immensely though!
评论 #17976932 未加载
评论 #17976494 未加载
评论 #17977228 未加载
评论 #17976830 未加载
评论 #17976794 未加载
评论 #17976837 未加载
评论 #17976860 未加载
Nitrampover 6 years ago
It&#x27;s interesting to see this, and curious if you look at it from an organizational decision making standpoint. Hypothetically, because I&#x27;m not involved in any of this, but still:<p>Facebook was initially implemented using PHP, and you can read this process as continued iteration based on this very early decision. From the outside, Facebook seems to have always taken what they had, taken the problems they currently had, and made the most incremental change they could to fix whatever problem they had. From PHP to HHVM to Hack to dropping PHP support, they continued iterating on what code base and development chain they currently had.<p>If you take a step back though, Facebook is gradually moving to a different programming environment, from a dynamic language with very loose semantics to a statically typed system with (from code I&#x27;ve seen in e.g. phabricator) a very different programming style than run of the mill PHP. While iterating incrementally, they still ended up forking PHP and moving to a different language.<p>The approach is quite different from e.g. Twitter though, who started off using Ruby on Rails, and then moved everything to an entirely different tool chain (Scala) when they found Rails couldn&#x27;t hold up with their problem set.<p>This difference in approaches isn&#x27;t quite the same as the good old &quot;rewrite vs refactor&quot; dichotomy. Twitter&#x27;s change was certainly incremental too, moving individual services to Scala bit by bit, setting them live incrementally instead of a &quot;big bang&quot; rewrite where everything moves to Scala one day.<p>I think the main difference is planning horizon: do you opportunistically fix whatever is broken right now, or do you make a long term plan on what you want your future platform to be, and then set out to get there?<p>Opportunistic fixing has the advantage that you can be pretty certain you&#x27;re fixing the right problem, and don&#x27;t invest in YAGNI features. On the other hand, you risk ending up in local optima. Pouring a lot of effort into PHP makes sense if you plan to continue using it - but if you end up forking the language anyway, you loose a lot of the advantages of a shared ecosystem (and arguably damage the existing ecosystem in the process through fragmentation).<p>You could equally well imagine Facebook picking a different future tech stack five years ago, be it Rust or Go or whatever, and add the features they miss from PHP to it. I think it&#x27;s an interesting thought experiment where that&#x27;d have taken them. I have no idea if taking that path would have been better for any of {Facebook, PHP, target language X, world}.
评论 #17977493 未加载
评论 #17977185 未加载
dsignover 6 years ago
Duly noted the desire of Hack to have more &quot;typing&quot;. It seems that as soon as projects growth beyond a certain size, everybody starts wanting to add that.<p>I wonder what would be the optimal lifecycle for long projects. Obviously, &quot;start with dynamic language X until you reach 10^n lines of code, then fork X and add types to it&quot; doesn&#x27;t work for smaller companies :-(
评论 #17976662 未加载
评论 #17976345 未加载
评论 #17976484 未加载
评论 #17976756 未加载
评论 #17976338 未加载
评论 #17976696 未加载
评论 #17977932 未加载
评论 #17976779 未加载
评论 #17976370 未加载
tschernoover 6 years ago
Poor Wikipedia will need to migrate back to php7 runtime which still could be complex despite of language compatibility.
评论 #17977045 未加载
评论 #17976864 未加载
crispytxover 6 years ago
Diverging from PHP was a good move as PHP 7 has largely caught up with HHVM in terms of speed. That&#x27;s really neat that Facebook invented their own language to meet their needs. Will have to mess around with it further sometime.
评论 #17975578 未加载
alexandercrohdeover 6 years ago
Hmm, I don&#x27;t really get it. But I suppose I don&#x27;t really know if I bought the value proposition of HHVM in the first place.
评论 #17975964 未加载
评论 #17975700 未加载
评论 #17976815 未加载
m_stover 6 years ago
Article from Marco Arment about exactly this, from 2014.<p><a href="https:&#x2F;&#x2F;marco.org&#x2F;2014&#x2F;03&#x2F;21&#x2F;hack" rel="nofollow">https:&#x2F;&#x2F;marco.org&#x2F;2014&#x2F;03&#x2F;21&#x2F;hack</a>
kevinconawayover 6 years ago
From the outside looking in, the most interesting part of the post is the note about their new release cadence:<p>&gt; As we expect the language to evolve rapidly, we strongly recommend using the regular releases instead of the LTS releases for large projects; while this does mean you need to upgrade more often, both us and our users have found that it is generally easier to catch up on 2 months worth of changes 3 times as often than 6 months of changes in one go. We will also be re-evaluating the length of our release cycle; one possibility is that we will move to releases every 4 weeks, with these releases being supported for 6-8 weeks.<p>That cycle will work for FB where they are constantly iterating and also have early insight as to where the language is going before they get there but for anyone on the outside or for slower moving projects, that cadence seems fairly punishing.<p>Is that a big change from how they release now?
jrs95over 6 years ago
This is bad news for Slack, I would think. I believe they went all in on HHVM + Hack, which is going to be increasingly incompatible with 3rd party packages now.
评论 #17976440 未加载
评论 #17976846 未加载
评论 #17977412 未加载
pritambarhateover 6 years ago
Do you think dynamic types was a mistake? Almost all popular dynamically typed languages have some sort of type hinting. All new promising languages have chosen to be statically typed.
评论 #17977205 未加载
评论 #17977014 未加载
评论 #17976887 未加载
评论 #17979440 未加载
评论 #17981310 未加载
评论 #17976824 未加载
TACIXATover 6 years ago
I tried using hack once, spent a few days on it. It was a total disaster from a user-developer perspective. The documentation was poor and certain modules (the xhtml or equivalent module in particular) would not work due to versions or dependencies. If they are going to make a push they need to really make it easier to get up and running on.
codr4over 6 years ago
Static&#x2F;dynamic is obviously a gradient. I find it a bit sad that it always seems to be either or these days, either no types or a full blown static generic type system.<p>I&#x27;m all for the ability to type variables and functions, as long as I&#x27;m still allowed to be exactly as precise as I feel like.<p>Many would call that static typing, since there are types in the code that the compiler consumes. But my own attempts [0] at building such languages tell me that the result is still more dynamic than most.<p>[0] <a href="https:&#x2F;&#x2F;github.com&#x2F;codr4life&#x2F;snabl" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;codr4life&#x2F;snabl</a>
kijinover 6 years ago
I wonder how this will affect major websites outside of Facebook that rely on HHVM, such as Wikipedia. They made a big announcement when they switched to HHVM in early 2015. Have they moved over to PHP 7 yet?
评论 #17976131 未加载
评论 #17977055 未加载
sigi45over 6 years ago
Aaand Hack ist dead. At least for everyone outside fb.<p>Not sure why fb even made it public. First baiting everyone by switching and now having full control.<p>Not sure who would risk that dependency.
评论 #17982244 未加载
giancarlostoroover 6 years ago
So who is using HHVM other than Facebook? Genuinly curious? Will be interesting to see where Hack goes altogether.
sebastianavinaover 6 years ago
Sincere question, but PHP is still widely used?<p>I remember that around the year 2002 it was almost the only choice (besides Perl) on shared hosting, but on this days its just a nasty language and with so many beautiful languages like Python GoLang and Ruby why would anyone use PHP for a new development?
评论 #17995533 未加载
debacleover 6 years ago
I think this is a step in the right direction. PHP&#x27;s refusal to break BC in the stdlib, among other things is probably the biggest impediment to the language being more widely accepted.<p>By breaking compatibility with PHP, Hack is going to be able to adapt more quickly and create a stronger language. Hopefully, Facebook will have the wherewithal to promote Hack to PHP (and other) developers, and grow the ecosystem as it can.
评论 #17978295 未加载
评论 #17983567 未加载
ape4over 6 years ago
I would have liked &quot;Hack&quot; to be some play on &quot;PHP&quot;. Maybe &quot;HPH&quot;. PHP++ or PHPPP
oh-kumudoover 6 years ago
Which makes sense. Facebook now is big enough to sustain a programming language on its own. And for Hack, I would assume it mainly to replace where the PHP used to be, which is a shallow API composition layer, no heavy lifting stuff. To fulfill that purpose alone, one need not to have super diverse ecosystem providing all kinds of libraries, just focus on a limited core functionality should suffice.
erikbover 6 years ago
Wasn&#x27;t HHVM created as compiler or interpreter for PHP?
评论 #17979703 未加载
k__over 6 years ago
Does this mean Facebook pulls its resources out of PHP?<p>Weren&#x27;t they THE big player that kept PHP alive in the last years?
评论 #17977209 未加载
评论 #17977232 未加载
评论 #17981614 未加载
aasasdover 6 years ago
Welp, so much for “PHP has JIT too.”
评论 #17975909 未加载
评论 #17976109 未加载
评论 #17975899 未加载