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

N

nick

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
 
B

Brian

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


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
 
N

nick

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.

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.
 
B

Brian

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top