Plus – A superset of PHP that makes PHP cool again
php-plus.com
php-plus.com
public function getName(): string {
return $this->name;
}
over public getName(): string => $this->name;Setters and getters can be valued for different reasons - I like them, personally, because it both allows you to separate the setting logic from the getting logic - it allows you to control and track reference acquisition (when that's important) and it allows you to easily swap in more complex logic for the simple expressions without requiring code changes to leak outside of the primary file. As such I've always loved language features and tricks to avoid ever actually defining getters and setters unless I need to explicitly override that behavior - and PHP has some neat tools in this space with `__get` and `__set` magic methods.
Is this real, or a massive troll attempt?
If they’re serious about this, they desperately need better marketing.
Nothing like calling your own project "cool" to make it appear incredibly uncool.
Hack started out as a superset of PHP, but it has diverged from the original language. Some of the features it was created to add (like type annotations and lambda functions) have since been added upstream, sometimes with different syntax; some of its other, stranger features (like XHP) are unlikely to ever be adopted upstream. At this point, it's best described as an incompatible fork.
XHP fixed one of the worst problems that PHP had, being a language intended to generate HTML that didn't recognize XML as a type, and so had no way to validate or contextually escape what it sent.
Sure, you can just use a templating framework like Twig to do it in PHP, or compile XHP into it, but you shouldn't have to.
PHP needs a way forward and it needs to bring all the software along for the ride otherwise whatever comes next is useless and that’s a hard problem but I sort of doubt that this will help fix anything.
That said, for most new development there's probably a better choice.
PHP 5.x days are long gone.
His About page is also the "Please donate" page. =\
https://github.com/php-plus/engine
I have some concerns about how some of the features might be implemented -- particularly the "readonly" property keyword -- but it's impossible to say for sure without seeing the code. (And I would be very disappointed if it turned out that the implementation doesn't exist yet.)
Props to HHVM, though, it really did seem to act like the swift kick up the arse for PHP that it needed, demonstrating just how unnecessarily slow PHP was and spurring them to deal with that.
Granted, there's a big difference between mostly dead and all dead - mostly dead is slightly alive.
But until I see some Hack projects posted on Show HN, it's still dead enough to me. If there's no community development around it to speak of, there's no point in adopting it. I can't even get the repos I used to pull from to work anymore, Openshift never had proper support, no one seems eager to add support for hosting it, and no one is writing articles or updating docs for it as far as I can tell.
It hasn't reached the "rifle through Hack's pockets for loose change" state, but the prognosis doesn't seem good.