Login   Register  
PHP Classes
elePHPant
Icontem

PHP is not intended to be Java

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

      PHP Classes blog  >  Hack Language is All ...  >  All threads  >  PHP is not intended to be Java  >  (Un) Subscribe thread alerts  
Subject:PHP is not intended to be Java
Summary:I can't agree with this title
Messages:4
Author:Gilberto Albino
Date:2014-03-24 12:35:16
Update:2014-03-25 12:26:36
 

  1. PHP is not intended to be Java   Reply  
Picture of Gilberto Albino
Gilberto Albino
2014-03-24 20:15:14
This Hack is not other thing than a Javish attempt agains PHP trying to prove something for the PHP community. In my point of view, this makes PHP a Java-like language. So, when you state that Hack is "All" that PHP should have been, you are not only denying the PHP way of doing things as well as saying PHP should be replaced by this very new Hack language, which as Java runs on a VM and is Java-like.
If one want to have a java-like-php language, it's better move to java.
PHP is not intended to reinvent the wheels of Dinosaur-fat-Java language.
Sorry, but I just can't let this post title to go without my deny for it and total reproval.

  2. Re: PHP is not intended to be Java   Reply  
Picture of Manuel Lemos
Manuel Lemos
2014-03-25 00:57:39 - In reply to message 1 from Gilberto Albino
There seems to be a misunderstanding. Hack does not make type declaration mandatory, unlike Java.

Also Java does not support asynchronous programming like Hack, actually I do not recall other languages that do asynchronous programming this well.

Anyway, these are just two of the points explained in the article. You may want to consider reading it again to see what I mean.

  3. Re: PHP is not intended to be Java   Reply  
Picture of Gilberto Albino
Gilberto Albino
2014-03-25 12:07:15 - In reply to message 2 from Manuel Lemos
Of course, that said... Facebook would have used Java! But that's very evident they tried to make a Php-Java version of their own.

  4. Re: PHP is not intended to be Java   Reply  
Picture of Manuel Lemos
Manuel Lemos
2014-03-25 12:26:36 - In reply to message 3 from Gilberto Albino
I would not say they tried to make PHP their own Java, but rather to implement features that can make HHVM compiled code run faster, like type coercion, as well other features that allow you to detect bugs in your code earlier.

Those sound like good intentions because they benefit PHP applications.

But of course, you do not have to migrate your code to Hack. You can just use regular PHP and still have some benefits of HHVM.