Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Converting a large codebase to Hack

Download

Right click “Save as…”

Slides (view online)
  • MP3 (Audio only)
  • MP4 (iPhone, Android)
  • High Quality MP4 (iPad, PC, Xbox)
  • Mid Quality MP4 (Windows Phone, HTML5, iPhone)

Facebook recently open-sourced Hack, a programming language for HHVM. Hack uses gradual typing and is fully compatible with PHP. Over the last year, Facebook has migrated a large part of its PHP codebase to Hack, thanks to both organic adoption and a number of homegrown refactoring tools. In this talk, I will give a high-level overview of the language and share some of the lessons learned during the migration process.

Follow the Discussion

  • How can you trust the judgment of someone who claims PHP is a good technology? And his proof is that they used it and they are successful!
    Egyptians made pyramids with primitive tools and were successful. Should we repeat that now?

    At least the name of the language is aptly chosen.

  • martinminemartinmine I eat C# for breakfast

    "PHP is a good technology and we have been very successfully with it", that pretty much sums up everything for me. And how it started, yes, people need to learn how to MVC in PHP if they want to create anything decent. 
    Every programmer agree that PHP is a horrible computer language. It is not even a programming language - it is a scripting language. Even though PHP is pretty widely used, one would think there are integrated template systems in the PHP libraries that ships with the PHP interpretor, no there is not. Neither are there any good designs or security mechanisms to avoid cross site scripting and other kinds of injection attacks. The language lacks clear and good documentation and the documentation and function parameters are often ambiguous. To me, PHP seems like an ugly, hairy ball that everyone has to use because it is just easy to use. But the more you use it, the more bugs you get. So you refer to a variable that doesn't exist because of a typo? Oops. Have fun debugging that. 

  • , martinmine wrote

    Every programmer agree that PHP is a horrible computer language. It is not even a programming language - it is a scripting language. Even though PHP is pretty widely used, one would think there are integrated template systems in the PHP libraries that ships with the PHP interpretor, no there is not. Neither are there any good designs or security mechanisms to avoid cross site scripting and other kinds of injection attacks. The language lacks clear and good documentation and the documentation and function parameters are often ambiguous. To me, PHP seems like an ugly, hairy ball that everyone has to use because it is just easy to use. But the more you use it, the more bugs you get. So you refer to a variable that doesn't exist because of a typo? Oops. Have fun debugging that. 

    Its definitely not the best language out there, but which is "best"? Every task need a proper tool, and PHP is in fact quite a handy tool to have in your arsenal. 

    And I cannot agree with the rest.

    1. Lack of integrated template system - one could see this as an advantage, there are plenty of template systems out there, just use one that fits you the most, or simply use shorthand operators.
    2. XSS - there is a set of filter_* functions, there are parametrised statements in database abstraction engine, and some others. Besides most of the frameworks take care of that.
    3. Documentation - maybe few times I had stumbled upon some ambiguity, but lots of comments and examples usually cleared any doubts. 
    4. I haven't noticed exponential growh of bugs during my experience, so thats simply false :P
    5. Non existing variable? error_reporting(E_ALL) will get you that. 

    I don't want to praise PHP here, just pointing that things doesn't look as bad, as you would like them to :).

    Besides as I mention PHP is a tool, and tool only, so like to any other tool (language) we should approach it without any bias. 

    Do you experience such negative feelings while thinking about the hammer?

Remove this comment

Remove this thread

close

Comments Closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums,
or Contact Us and let us know.