Live data from Hacker News

PHP is much better than what you think

fabien.potencier.org

271–280 of 346 posts

Re: PHP is much better than what you think

#271
post #129

Earlier quoted context omitted.

MRI Ruby is actually significantly faster than CPython these days.

Citation needed. Both CPython and MRI are slow - if you need computational speed, use something else. But when your are comparing them to each other, CPython is faster. I don't know where you are getting that significantly faster bit from. Since most benchmarks are unscientific, this one is as good as any. So here goes: http://shootout.alioth.debian.org/u64q/benchmark.php?test=al...

>>Since most benchmarks are unscientific, this one is as good as any.1) You seem to be using "unscientific" as a nothing more than an insult.

2) Your conclusion "this one is as good as any" doesn't follow from your premise that "most benchmarks are unscientific" -- "this one" might well be different from "most benchmarks".

3) If your conclusion was correct then that wouldn't mean that the benchmark was good, just that it was also bad.

Re: PHP is much better than what you think

#272

Earlier quoted context omitted.

Wrong wrong wrong wrong wrong. I can see you posted this without doing so much as a single google search pointing your browser to "cakephp.org". I am interested in hearing skrebbel's response to this question however (what makes cake so horrible).

Goodness. Sorry. Perhaps I just misunderstood. To me it seems sold as the successor to Cake. http://www.meetup.com/lithium/

The Lithium folks (nate & gwoo in particular) split off from the Cake core team. There was some contention but generally speaking I think everyone is still friends. As for lithium being the successor to cake 1.3... well certainly nate & gwoo feel that way, that's why they built it. :) And certainly phpnut & mark_story don't feel that way, that's why they are still driving forward with cake 2.0. Anyway they are both cool projects but I was reacting strongly to your assertion that cake is "no longer maintained", which is as accurate as saying RoR is no longer maintained and has been officially superseded by Node+Express.

Re: PHP is much better than what you think

#273

Hacker News really doesn't like PHP. There's a whole lot of blind prejudice in this thread Arguments against PHP are as futile as arguments in support of PHP. It's a programming language. The only thing that matters is the person using it. I'm sure Ruby, Node and Go are super duper awesome in a lot of academic ways, but unless we're talking about awesome things that have been made with them, it's just blah blah blah…

> It's a programming language. The only thing that matters is the person using it.

No! Please see "Beating the Averages" [http://paulgraham.com/avg.html] (skip to "The Blub paradox" for tldr)

It it true that a lot of discussion here is pointless evangelization and bashing, but the argument "programming language does not matter, only the programmer" is even worse. If that was true, there would be no difference between a C# programmer and a Visual Basic programmer. Languages would stay the same with no initiative to change. Yet they do change and evolve. Programming languages vary in power, even though they are Turing-complete.

Re: PHP is much better than what you think

#274
post #129

Earlier quoted context omitted.

MRI Ruby is actually significantly faster than CPython these days.

Citation needed. Both CPython and MRI are slow - if you need computational speed, use something else. But when your are comparing them to each other, CPython is faster. I don't know where you are getting that significantly faster bit from. Since most benchmarks are unscientific, this one is as good as any. So here goes: http://shootout.alioth.debian.org/u64q/benchmark.php?test=al...

If you're looking at measurements made on the quad core machine, then remember to check the "≈ CPU Load" column to see whether some programs are using multiple cores and some programs are only using one core.

When the comparison would be better without that complication, look at single core measurements -- http://shootout.alioth.debian.org/u64/benchmark.php?test=all...

Re: PHP is much better than what you think

#275
post #44

If Fabpot seriously believes Composer is better than Bundler/apt/Maven, then he's crazy.

Have you used it at all? I'm not going to pretend it's better than Bundler, we took a lot of inspiration from it and we may have a few unique features compared to it, but that's it. apt is pretty different anyway since it does system level stuff. Maven I think is insane, it does way more than a package manager should do. That said when you look at Python for example, the package management landscape is a scattered me…

Yep I have used Composer and Packagist - http://packagist.org/packages/orderly/paypal-ipn-bundle is one of mine. And TBH I agree with you on Python - the packagement management scene there is a mess. Maven I think gets a bad rap - once you find out about http://mvnrepository.com/, it's actually smooth sailing.

Re: PHP is much better than what you think

#276

Hacker News really doesn't like PHP. There's a whole lot of blind prejudice in this thread Arguments against PHP are as futile as arguments in support of PHP. It's a programming language. The only thing that matters is the person using it. I'm sure Ruby, Node and Go are super duper awesome in a lot of academic ways, but unless we're talking about awesome things that have been made with them, it's just blah blah blah…

> Hacker News really doesn't like PHP. But Y? function Y($F) { $func = function ($f) { return $f($f); }; return $func(function ($f) use($F) { return $F(function ($x) use($f) { $ff = $f($f); return $ff($x); }); }); }

I would fire anyone who wrote code like this in a real app. Surely there can be another way to achieve the same result with a much cleaner and maintainable implementation. Code like this is written by prima donna programmers who have no respect that other people will someday have to read and maintain their code. I say this about any similarly-convoluted code, not just in PHP.

Re: PHP is much better than what you think

#277

For reference's sake, this article is written by Fabien Potencier, the creator of the symfony framework. This guy's probably single-handedly responsible for lifting the PHP community to a higher level, by making great software (which, when he started, was pretty unique, with horrible hacks-upon-hacks like CakePHP being the norm), and by showing people how to do so.

For what it's worth, CakePHP was a hack to get PHP working as it properly should. Our base object class was made so that PHP4's broken object model would work as expected. It has also gotten a lot better, but has also taken a different approach to application development than many of the other available PHP frameworks.

Re: PHP is much better than what you think

#278

Earlier quoted context omitted.

Python docs are way better on a technical level IMO (more detailed, more accurate - if you want to know what a function does in PHP you need to spend hours reading through the massive comment threads to find the corrections, and then ignore the comments from years ago since the API changed and the comments didn't, etc etc); but much like the rest of PHP, the PHP docs are incredibly convenient - php.net/function_name…

No serious PHP developer actually go to php.net to read the documentation, literally all of the big PHP editors/IDEs come with an embedded manual so when you write strpos( it automatically tells you the order of variables. If I really had to go to php.net to look up order of variables or even a function name then I wouldn't be programming in PHP at all, would take too long. Thankfully, since I'm not restricted to not…

You're basically saying that no serious PHP developers are using, say, VIM or Sublime Text, which is not true. I still hit php.net from time to time.

Re: PHP is much better than what you think

#279
PHP still can't access email inboxes inherently, can't do CSV import, can't download packages from GitHub the way Bundler can, doesn't support metaprogramming, has a hacked-together OOP system, and has an absolutely horrid syntax.

Why am I meant to use PHP again?

Oh yeah, because you haven't discovered Ruby yet.

Re: PHP is much better than what you think

#280
post #24

Earlier quoted context omitted.

I guess the worlds most popular websites, and the vast millions of PHP programmers must all not really exist. They can't exist, and can't be making good stuff, because PHP is just doesn't work. Here is a list of template languages people on 'real' platforms use: Python. Airspeed, Castalian, Chameleon, Cheetah, CubicTemp, Django template system, Elements, EmPy, Evoque, HRL Powerful macro preprocessor for HTML, Genshi,…

I guess your point is that there are too many options. But you have artificially inflated the count as you have made this point. Most of the things you have listed are not applicable (either not used any more, or are not general and were never used to compose full HTML pages). Cut out the ones which are not actively developed and you only have a handful for each language. Since the problem seems to be that you need s…

> Cut out the ones which are not actively developed and you only have a handful for each language.

"The template language you pick has a good chance of becoming an abandoned project" hardly seems a great selling point.

Post reply on HN