Live data from Hacker News

Announcing a specification for PHP

hhvm.com

121–130 of 263 posts

Re: Announcing a specification for PHP

#121
post #118

Facebook first needs to bring HHVM up to full compatibility before they try altering the spec. I also discovered Facebook makes all their "contributors" (anyone who does a pull request) sign an agreement with them, which seems weird and not cool. https://code.facebook.com/cla

> Facebook first needs to bring HHVM up to full compatibility before they try altering the spec.

Defining a spec (there isn't a pre-existing spec that is being "altered") is an important part of moving to acheive compatibility, since its how you know what the target is.

HHVM spawning a spec effort for PHP is a lot like Rubinius spawning RubySpec.

Re: Announcing a specification for PHP

#122

Earlier quoted context omitted.

Agree. PHP started itself out with the handicap of a lot of shitty misfeatures, and now that they've beaten it into a state that it's possible (though in no way encouraged) to write decent code in it, anybody who doesn't put on a "PHP: It's not that bad!" party hat gets called a hater. I'm afraid they're going to have to show me reasons it's actually superior to other languages before I'm going to jump on the train.…

So, if your PHP programs don't embed HTML in ?><?, and you use a framework with its own URL routing instead of multiple files, and your framework has plugin autoloading and initialization on every page request… why are you using PHP?

In case that was not a rhetorical question: I'm not using PHP.

Re: Announcing a specification for PHP

#123
post #90
post #17

Earlier quoted context omitted.

I don't think many would claim that PHP isn't capable. It's that some of us just don't enjoy it and find it to ugly. Especially given how mature competing languages have become.

I work at a PHP shop, coming from a Python background. I chose to come here for the team, certainly not the language. When I asked about why some things are inconsistent in PHP compared to other languages, its age was a common defense. I was shocked to find that Python is older than PHP, and Ruby is the same age!

However, Ruby didn't see the uptake of usage that PHP did. It was popular -- one of the first languages that you could use as an alternative to CGI!

However, age isn't why it's got so many sharp edges. That's Rasmus' fault, and the core team's.

Re: Announcing a specification for PHP

#124

PHP is fantastic if you are starting from scratch and you don't necessarily need any third party libraries. PDO is very well done and the native database drivers are some of the fastest available. With a properly tuned nginx/fpm/apc stack, I've been able to deliver solutions that truly back up the results you see from comparison benchmarks like Techempower. In many cases in web development, PHP can be the right tool…

With HHVM + nginx you can really fly! Seriously, it's amazing how fast it is (and the Techempower benchmarks put it at #1 for anything with multiple requests and data handling!)

Re: Announcing a specification for PHP

#125

Earlier quoted context omitted.

There are languages whose communities everybody hates, but it doesn't seem to be that everybody hates Ruby or Clojure or whatever. Just that everybody hates their trendiness.

I haven't found the Clojure haters yet but I can find a Ruby hater without looking too hard.

Curious about the hate. As far as languages go Ruby is as coherent as it gets.

Re: Announcing a specification for PHP

#126
post #118

Facebook first needs to bring HHVM up to full compatibility before they try altering the spec. I also discovered Facebook makes all their "contributors" (anyone who does a pull request) sign an agreement with them, which seems weird and not cool. https://code.facebook.com/cla

> I also discovered Facebook makes all their "contributors" (anyone who does a pull request) sign an agreement with them, which seems weird and not cool. https://code.facebook.com/cla

This is standard for virtually any open-source project backed by a large company and for many that are independent (e.g., all Apache projects: http://www.apache.org/dev/new-committers-guide.html#cla).

Re: Announcing a specification for PHP

#128
post #87

Earlier quoted context omitted.

>>> To be fair, all languages are "a bit quirky". Agreed. These are just a few quirks in PHP I find amusing.

I'm sure you've already seen this (it's been around a while), but if not, you'll find it amusing: http://www.phpwtf.org/ Last I checked, it wasn't quite as good as wtfjs, but it looks like quite a few new surprises have been added rather recently. Edit: Correction, there's only one new entry as of this year, which is a shame. :)

Weird, clicked the link, and my computer crashed. Opened it now, perfectly fine. Weird.

Re: Announcing a specification for PHP

#129
post #118

Facebook first needs to bring HHVM up to full compatibility before they try altering the spec. I also discovered Facebook makes all their "contributors" (anyone who does a pull request) sign an agreement with them, which seems weird and not cool. https://code.facebook.com/cla

These CLA are fairly common arent they, esp. among largercompanies that have/run open source projects? ? e.g. https://github.com/angular/angular.js/blob/master/CONTRIBUTI...

Re: Announcing a specification for PHP

#130
post #46

Earlier quoted context omitted.

If you want to order your program in a specific way, you introduce the appropriate level of abstraction. Same as with any other language. EDIT: i totally agree that the standard functions are a complete mess in PHP. But they have to stay around for backwards compatibility. Have a look at the SPL classes: http://php.net/manual/en/book.spl-types.php

This simply isn't possible in a way that would be convenient. For example, how would I make a string abstraction? Create a class? Ok, so we have: $str = new String("foo") $str->replace(...) over $str = "foo" str_replace($str, ...) This is fine, if we ignore the fact it's much slower. Where it really gets annoying is PHP's lack of operator overloading. That means to concatenate I'd need to do $str->concat($str2)->conc…

Many PHP data types (such as mysqli etc) have been made into objects, and I agree 100% that it's silly to do this with strings. Ease of string manipulation is a PHP strong point.

You'll be giving PHP devs a loaded gun by allowing them to register primitive types (as proposed by nikic). Most frameworks would add to them, but I know some people would change default behaviour to 'fix' issues such as db character encoding issues which would make debugging hell.

Post reply on HN