Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PHP to C++: HipHop for PHP ...thoughts?

1 view
Skip to first unread message

nick

unread,
Feb 6, 2010, 4:40:31 AM2/6/10
to
Developers over at Facebook are getting ready to release a PHP to C++
code converter, dubbed 'HipHop' (HPHP). The reaction has been positive
on the PHP side; although this really only benefits large-scale web
apps ATM, it may already be influencing the direction the PHP language
spec will take, and I could see it breathing some new life into the C+
+ community as well (read: jobs (as C++ programmers)). I'd love to
hear this group's thoughts on this!

http://developers.facebook.com/news.php?blog=1&story=358

Ira Baxter

unread,
Feb 6, 2010, 12:33:36 PM2/6/10
to

"nick" <nic...@fastmail.fm> wrote in message
news:b0921cc0-c6dd-4a90...@u41g2000yqe.googlegroups.com...

HipHop is *just* a compiler that happens to emit C++.
They could have emitted C and probably done just about as well if not
better.
Lots of compilers have been built over the years that generate
C or C++ as output in the name of portability (really in the name
of avoiding generation of a backend for target machines).

IMHO, what a compiler emits as a target doesn't "breathe life" into the
target.
It makes PHP somewhat more interesting, agreed, in that it
helps to serve Facebook and Yahoo at their scale.

--
Ira Baxter, CTO
www.semanticdesigns.com


Brian

unread,
Feb 6, 2010, 2:54:01 PM2/6/10
to


Southwest Airlines dumped PERL for performance reasons ten
years ago and started using C++. I'm not real impressed
that Facebook has learned the lesson though. They seem
to be coming to C++ kicking and screaming.


Brian Wood
http://webEbenezer.net
(651) 251-9384

nick

unread,
Feb 6, 2010, 3:01:09 PM2/6/10
to
On Feb 6, 12:33 pm, "Ira Baxter" <idbax...@semdesigns.com> wrote:
> "nick" <nick...@fastmail.fm> wrote in message

The "life-breathing" part was in reference to all the PHP libraries
that need to be converted to C++ now for this to work... they have to
be converted manually. So if ext_mysql has already been converted but
ext_pgsql has not, and some large site is using pgsql and wants to use
HipHop, there's some C++ code waiting to be written.

Another thing I could possibly see happening is HPHP evolving to the
point where views can be written in PHP and (to borrow some .NET
terminology) the "code behind" the view could be written in C++, in
the same way .NET uses ASPX for the view and C# for the "code behind."
It's probably too early to tell if this is a realistic scenario, but I
could really see something like this creating some new work for C++
developers, giving web devs a reason to learn/use C++ in the first
place, etc.

Kensai

unread,
Feb 6, 2010, 5:16:00 PM2/6/10
to
On 6/2/2010 8:54 μμ, Brian wrote:

> Southwest Airlines dumped PERL for performance reasons ten
> years ago and started using C++. I'm not real impressed
> that Facebook has learned the lesson though. They seem
> to be coming to C++ kicking and screaming.

C++ is greener as well. Well not according to everyone, but performance
is always a consideration once your service becomes important.

http://www.webtoolkit.eu/wt#/blog/2009/12/17/facebook__php__is_not_very_kopenhagen/more

Brian

unread,
Feb 6, 2010, 6:56:49 PM2/6/10
to
On Feb 6, 4:16 pm, Kensai <kens...@gmail.com> wrote:
> On 6/2/2010 8:54 μμ, Brian wrote:
>
> > Southwest Airlines dumped PERL for performance reasons ten
> > years ago and started using C++.  I'm not real impressed
> > that Facebook has learned the lesson though.  They seem
> > to be coming to C++ kicking and screaming.
>
> C++ is greener as well. Well not according to everyone, but performance
> is always a consideration once your service becomes important.
>

It should be a consideration before a service becomes
popular. If you fail to plan (for success), I think
you plan to fail.

I suggest being ruthless when it comes to scripts
and programs in other languages that someone wants
to write. They look helpful and harmless, but they
turn into monsters overnight if you aren't careful.
You can pay now or pay more later. Facebook like
many others, said in reply, "No thanks." Now
though, they're biting the bullet for their past
ways.


Brian Wood
http://webEbenezer.net


"Where there is no vision, the people perish: but he
that keeps the law, happy is he." Proverbs 29:18

0 new messages