Announcement

Collapse
No announcement yet.

Facebook Introduces "Hack" Language, Based On PHP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Facebook Introduces "Hack" Language, Based On PHP

    Phoronix: Facebook Introduces "Hack" Language, Based On PHP

    Facebook has announced Hack, a new scripting language based primarily on PHP and powered by their HHVM interpreter...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Hang on... they're creating a new language based on PHP, and they think they can make it more worthy of the name "HACK" than the original?

    Comment


    • #3
      Somebody is comma happy in that article.

      Comment


      • #4
        A bit better than the original, however it's still PHP which means it's still meh.

        Comment


        • #5
          Dialact

          Shouldn't they call it a dialact?

          Comment


          • #6
            I guess it's probably easier than rewriting all of Facebook in a better language.

            Comment


            • #7
              Why are people so much against PHP? It is simple to use, and start with, and it is not like it is meant to be used for system programming or artificial intelligence. I think it is mostly because of bad programming practices, from the time of PHP 4 and before. There were bunch of crazy web designers, without basic programming know how, best practices and design patterns writing terrible looking, hard to maintain code. I really don't have experience with Python, but I doubt it can prevent someone to write messy code.

              Comment


              • #8
                Originally posted by reCAPTCHA View Post
                Why are people so much against PHP? It is simple to use, and start with, and it is not like it is meant to be used for system programming or artificial intelligence. I think it is mostly because of bad programming practices, from the time of PHP 4 and before. There were bunch of crazy web designers, without basic programming know how, best practices and design patterns writing terrible looking, hard to maintain code. I really don't have experience with Python, but I doubt it can prevent someone to write messy code.
                No it don't have with bad programming practises to do. It's truly a very bad programming
                language that does everything it can to screw you over.

                Comment


                • #9
                  Originally posted by Pajn View Post
                  It's truly a very bad programming
                  language that does everything it can to screw you over.
                  http://me.veekun.com/blog/2012/04/09...of-bad-design/
                  It's this bad, because it's been abused to do things for which it has never been intended to in the first place, and has grown into a monstrosity from that point.

                  The rant you cite, although valid from technical point of view (I agree with technicality behind all its points), like any other of the technically correct rants about PHP, is written by a Real Programmer (tm), with a big extensive experience in the field, and who as an everyday job writes huge million-lines long applications.
                  From his point of view, he is indeed right, and PHP would be very badly suited for this kind of use. PHP-written big applications, like Facebook or Wikipedia, are more an exception (done for some precise historic or technical reason) than the rule.

                  But, in the first place, PHP has began its life as a quick tool to put some dynamic content inside a web page. While fire up a huge web application, when you could simply just write a single line of PHP code ?
                  PHP Code:
                  <body>
                  <p>The current foo is: <?php print $foo?></p>
                  </body>
                  That how PHP began its life, and that's the extent of how far it should be used.

                  Complaining about PHP's problems, would make as much sense as complaining about the limitation and short commings of shell scripts.
                  (which share some of PHP problems, including inconsistencies of API, because most of the shell call into system command which have each their own parameter syntax).

                  The main problem with PHP is not that it's bad language, it's that is *used* as a programming language, whereas it should be for quickly hacking small dynamic stuff like what it was designed for.
                  It would be akin to creating a complex desktop application with a GUI by using nothing but shell-scripts: It is possible, but that would be a really bad idea.
                  And in both case, there's only a very limited subset of situation where is would make sense (complex web applications written in PHP only make sense for end-user who only have a "classic" web page service: upload files with FTP and have apache serve them, instead of being able to run a full blown web application on a real full-scale web server.
                  Complex application written in shell script only make sense, for example, for the first stage of an ".sh" installer, before being able to unpack and run actual binary code).
                  In both case, after the phase of quick-prototyping, if the project grows, it would be better to switch to a language which scales up. Even if that language is Perl (still very hackish, still oriented toward fast-prototype and small experiments, but at least scales better up than PHP).

                  Comment


                  • #10
                    Originally posted by DrYak View Post
                    It's this bad, because it's been abused to do things for which it has never been intended to in the first place, and has grown into a monstrosity from that point.

                    The rant you cite, although valid from technical point of view (I agree with technicality behind all its points), like any other of the technically correct rants about PHP, is written by a Real Programmer (tm), with a big extensive experience in the field, and who as an everyday job writes huge million-lines long applications.
                    From his point of view, he is indeed right, and PHP would be very badly suited for this kind of use. PHP-written big applications, like Facebook or Wikipedia, are more an exception (done for some precise historic or technical reason) than the rule.

                    But, in the first place, PHP has began its life as a quick tool to put some dynamic content inside a web page. While fire up a huge web application, when you could simply just write a single line of PHP code ?
                    PHP Code:
                    <body>
                    <p>The current foo is: <?php print $foo?></p>
                    </body>
                    That how PHP began its life, and that's the extent of how far it should be used.

                    Complaining about PHP's problems, would make as much sense as complaining about the limitation and short commings of shell scripts.
                    (which share some of PHP problems, including inconsistencies of API, because most of the shell call into system command which have each their own parameter syntax).

                    The main problem with PHP is not that it's bad language, it's that is *used* as a programming language, whereas it should be for quickly hacking small dynamic stuff like what it was designed for.
                    It would be akin to creating a complex desktop application with a GUI by using nothing but shell-scripts: It is possible, but that would be a really bad idea.
                    And in both case, there's only a very limited subset of situation where is would make sense (complex web applications written in PHP only make sense for end-user who only have a "classic" web page service: upload files with FTP and have apache serve them, instead of being able to run a full blown web application on a real full-scale web server.
                    Complex application written in shell script only make sense, for example, for the first stage of an ".sh" installer, before being able to unpack and run actual binary code).
                    In both case, after the phase of quick-prototyping, if the project grows, it would be better to switch to a language which scales up. Even if that language is Perl (still very hackish, still oriented toward fast-prototype and small experiments, but at least scales better up than PHP).
                    Saying that PHP isn't supposed to write big apps is wrong. It were true in the beginning but now they try to sell it as a real language with OO and such. And a lot of people believe in that utter crap.

                    PHP is a powerful templating language, however it isn't a good one as it is designed more like a programming language than a templating language. I do use PHP myself on occasion as it's powerful and simple to get started with. However I never ever would use it in something that is bigger than three files or 100 lines in total (whatever comes first). If PHP ever only where advertised that it should only be used under that simple rule I wouldn't have any problem with it at all, now it's advertised as
                    PHP is a popular general-purpose scripting language that is especially suited to web development.

                    Fast, flexible and pragmatic, PHP powers everything from your blog to the most popular websites in the world.
                    and I say, and stand for, that PHP is the worst programming language ever constructed.

                    Comment

                    Working...
                    X