r/lolphp • • Sep 19 '17

HHVM dropping PHP

http://hhvm.com/blog/2017/09/18/the-future-of-hhvm.html
69 Upvotes

31 comments sorted by

View all comments

17

u/deusex_ Sep 19 '17

How's this /r/lolphp?

0

u/[deleted] Sep 19 '17

[deleted]

6

u/Schmittfried Sep 19 '17

It is a good idea.

0

u/[deleted] Sep 19 '17

[deleted]

4

u/Schmittfried Sep 19 '17

I don't see how it breaks MVC. It does not. It's just a template engine directly integrated into the language just like LINQ is SQL directly integrated into the language. This adds type safety and other safeguards that would usually be missing with an external template engine / ORM without language support. Neither XHP nor LINQ break solid architectural patterns. Adhering to those is up to the developer, not the tools he uses.

0

u/[deleted] Sep 19 '17

[deleted]

3

u/fred_emmott Sep 21 '17

This is not how we use it internally; I'm not sure if it was at the time, or if this example was just structured like this to be more approachable in the context of a blog post.

Edit: https://github.com/hhvm/user-documentation/tree/master/src/site is a fair bit closer of an example to how we use it internally

3

u/fred_emmott Sep 21 '17

Though yes, we do use it in a way that breaks MVC; see the section on 'Asynchronous XHP' on https://code.facebook.com/posts/858739974205250/announcing-xhp-js-building-efficient-user-interface-components-with-hack-react-and-xhp/

TL;DR: we feel that encapsulation of a logical component is more important in some situations, and it can have performance benefits due do reducing over-fetching.