Live data from Hacker News

Hack Isn't PHP

marco.org

1–10 of 71 posts

Re: Hack Isn't PHP

#2
so new language built by mega corp on top of debated language hasn't garnered enough trust and buy-in to facilitate mainstream use?

Seems fair - I do like the static typing of hack though. Weak typing has its place but it can become a real PITA (looking at you javascript).

Re: Hack Isn't PHP

#3
> PHP isn’t a great language, but it is a good language [...] it’s just as possible to write good, well-structured code in PHP as in most other languages

That isn't what "good language" means.

Re: Hack Isn't PHP

#5
Zend the organisation, is probably what Marco meant when referring to poor stewardship, instead of the OS project Zend Framework.

I like Hack because it explicitly doesn't support[0] a bunch of cruft from PHP. It feels a lot to me like the BC-breaking PHP.next people want - easy to switch to for modern applications, but not hindered by supporting PHP 4 code. Bit early to start pointing fingers at it's future though.

[0]: http://docs.hhvm.com/manual/en/hack.unsupported.php

Re: Hack Isn't PHP

#6
> It’s developed and supported exclusively by one huge web company, and they may decide to deprecate and replace it in a few years

Other than the "web" bit, isn't that true of most new languages, where $proposer is google, microsoft, typesafe, mozilla, redhat, netbrains?

Should people feel more secure if instead of being built and used by one large corporation it was built and used by a single guy? Or should we prefer not to have a big company supporting it?

Re: Hack Isn't PHP

#7
> This is exactly what the PHP world needed: making its already-fast performance many times faster (amplifying one of PHP’s biggest advantages over other common web languages)

I think PHPs speed is largely exaggerated here. The interpreter always used to be slow, and before the bytecode cache it was plain awful. Im pretty sure it only ever got away with it because so much of the standard library is thin wrapping. Is it really faster than CPython like for like?

Re: Hack Isn't PHP

#8
I'm not much of a PHP coder, so I tend to watch these flamewars from a distance on the sidelines.

However, I've never really understood why people criticize or mock Facebook for pouring so many resources into PHP. For building cross-compilers, toolchains, and syntactic extensions on top of a language that is seen as a fundamentally weak foundation.

I mean, I DO understand all of those criticisms. I just don't get how the same people can then turn around and use CoffeeScript, TypeScript, Dart, and even Node.js on the server-side. Compared to a JavaScript foundation, PHP is bedrock!

Re: Hack Isn't PHP

#9
>It’s developed and supported exclusively by one huge web company, and they may decide to deprecate and replace it in a few years as their technical needs change or its core engineers move on to new projects.

Thats an interesting sentiment. The exact same could be said for languages like Go (Google), C# (Microsoft), Rust (Mozilla) and platforms like NodeJS (Joyent). In any case it doesn't seem like too much of a worry. Cassandra came from Facebook, and was well done enough that another company came in and picked up development when Facebook left it.

Re: Hack Isn't PHP

#10
post #5

Zend the organisation, is probably what Marco meant when referring to poor stewardship, instead of the OS project Zend Framework. I like Hack because it explicitly doesn't support[0] a bunch of cruft from PHP. It feels a lot to me like the BC-breaking PHP.next people want - easy to switch to for modern applications, but not hindered by supporting PHP 4 code. Bit early to start pointing fingers at it's future though.…

> Writing list(, $b) = array(3,4) is not allowed. Instead use $_, i.e.: list($_, $b) = array(3, 4).

Not that I think the former is good practice at all, but isn't the latter a kind of weird use of what is a valid variable name?

Post reply on HN