Given HHVM is already being dropped from PHP packages because of its lagging compatibility, announcing that they're not targeting PHP compatibility any more might be the nail in the coffin for HHVM (and thus Hack) as a viable “upgrade” from PHP for existing codebases.
I mean, it's great that Hack will work for new Hack code and existing Hack codebases, but there aren't a lot of those. It makes sense for Facebook — why waste your efforts on maintaining part of your runtime that you don't need? — but I wonder if this will consign HHVM to irrelevance in the long term. Maybe Hack is a compelling platform for new code, but then, why use this obscure proprietary Facebook thing that's a bit better than PHP when you could use any of the numerous other languages out there that are also better than PHP but have much better ecosystems?
Personally this makes me sad because I wanted to see a standardised, multiple-implementation PHP language. Facebook did, even. They paid someone to write a spec: https://github.com/php/php-langspec
Maybe someone will write a new PHP implementation to take that idea forward. Or maybe we'll be stuck with Zend forever.
It may be just my lack of familiarity with the PHP / Zend, but it seems like one of the most significant things that HHVM achieved was a wake-up call to Zend. It seemed like they suddenly started putting some serious effort in to PHP7's runtime, and publicising what they were doing. A bit of a wake-up call to a language that was languishing for performance.
Just wondering:
"numerous other languages out there that are also better than PHP but have much better ecosystems"
What languages are you thinking of?
I've used a lot of different languages, but I still think PHP is awesome for web developmemt. Being normally limited to "one request, one execution" might be an annoying limitation in some situations, but other than that I think PHP does the job quite well. So that's why I'm wondering what you think is a better existing alternative.
Out of curiousity when someone says "awesome for web development" I would generally expect Python or Ruby to be in the following sentence. Maybe even js/node (if that's your cup of tea).
I can understand the plus points are an enviably simple deployment story and ease of recruiting developers. Is there anything else that you would argue makes PHP especially suited to the web over other competing languages?
Not the OP, but my experience: C# would be my first choice, but in my current job I've had to work on Ruby on Rails and a Symfony app with PHP 7 and I would choose the latter any day of the week.
I really dislike working with Ruby because, you know, who knows what the hell the code does until you try running it, and the IDE support is terrible.
On the other hand, working in "modern" OO PHP feels a little like working in a weird, older version of Java. PHPStorm can give a great IDE experience, I can add type declarations everywhere, the code is generally predictable once you learn some PHP quirks, etc. Also, in my opinion, Symfony is way better designed than Rails, and definitely closer than ASP.NET MVC than Rails is.
I feel like it'd be a pretty different story if I were working on Wordpress or some ancient legacy PHP code or whatever, but I'm not, so that's not really my concern.
Symfony is really great fun to work with, the attention to structural design and implementation is divine. As projects grow they almost get easier to work on, as Symfony forces and supports you in modularising and reduction.
The strength of PHP is the fact that you can get php hosting for almost no money, that takes no effort to setup, is shared but isolated, and is almost always portable
A programmers response is “I can throw Django in a container” or “I can just buy a digital ocean droplet”, and that’s true for a Developer, but it’s like putting Linux on your grandma’s laptop - you can maintain it, but the target audience can’t
The reason people build sites in PHP is that the people for whom they’re building the sites can trivially support it. Forever.
Most web interactions are: your client sends a request to a server, the server sends back a response. That's kinda the model of php: single execution, no need to manage memory or resources because the world is destroyed once you've send your response. So php is a good fit for webdev.
Until you start playing with sockets or things like kafka then you really want languages which are made for long lived processes. But if you're just making a REST API, blog or anything which is not an app with sockets php is a good choice. Especially since 7.0, composer and the current leading frameworks Laravel and Symfony changed the landscape.
I really like the that you don't need a templating language on top of it, just use shorthand php syntax instead.
I also find that developmemt time is quite fast, even without using frameworks.
You probably don't need templating languages or frameworks, php makes it easy without it, it's built for it.
The performance is quite good, way better that most people think. It's also easy to write functionality in C if you really need to go all out.
For other stuff than web development PHP has it's downsides. It's made for building websites and in my opinion it's doing that job very well, but most other languages are general languages that works better for most other things.
I think most people would enjoy PHP way more without a heavy and insanely slow framework.
It makes me sad that, as a Mac-based developer, installing & updating HHVM takes half an hour (via Homebrew). I imagine that has taken the wind out of many people's sails, when contemplating migrating/updating codebases to HHVM's (superior) syntax.
Sorry, I know this is a pain; I'm hoping to fix it by the end of the year (along with bringing back nightly debs, and supporting more recent versions of debian/ubuntu). For homebrew build times, there's https://github.com/hhvm/homebrew-hhvm/issues/5
If they are not going to specifically target the language compatibility, then the compatibility doesn't exist. My interpretation of this post basically speaks the death of HHVM support PHP, and start exclusively as runtime for Hack.
> Given HHVM is already being dropped from PHP packages because of its lagging compatibility, announcing that they're not targeting PHP compatibility any more might be the nail in the coffin for HHVM (and thus Hack) as a viable “upgrade” from PHP for existing codebases.
They're dropping PHP5 support, but it sounds like they're not actively trying to be incompatible with PHP5, so I doubt that gets worse right away. There's no existing codebase that's PHP7 already that would consider Hack, is there?
I mean what problem does it really solve when PHP7 has much more robust typing? At this point I think it's only instance variables and inline variable declarations that can't be typed.
I mean, it's great that Hack will work for new Hack code and existing Hack codebases, but there aren't a lot of those. It makes sense for Facebook — why waste your efforts on maintaining part of your runtime that you don't need? — but I wonder if this will consign HHVM to irrelevance in the long term. Maybe Hack is a compelling platform for new code, but then, why use this obscure proprietary Facebook thing that's a bit better than PHP when you could use any of the numerous other languages out there that are also better than PHP but have much better ecosystems?
Personally this makes me sad because I wanted to see a standardised, multiple-implementation PHP language. Facebook did, even. They paid someone to write a spec: https://github.com/php/php-langspec
Maybe someone will write a new PHP implementation to take that idea forward. Or maybe we'll be stuck with Zend forever.
The future is strange.