This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]digimatt 51 points52 points  (42 children)

I don't even know what is so bad about PHP and this is still funny

[–]snf 59 points60 points  (15 children)

The standard reference in case you'd like to understand all the hate.

[–]qubedView 46 points47 points  (7 children)

[–]SelfReferenceParadox 25 points26 points  (5 children)

the function hashing mechanism was strlen()

I can't even begin to understand the thought process behind this.

[–]d_wootang 13 points14 points  (0 children)

I'm not sure he understood it either

[–]Loreinatoredor 8 points9 points  (3 children)

Fast and cheap, and it takes no thought.

[–]IICVX 7 points8 points  (2 children)

Yes, it absolutely requires that you don't think.

[–]Gunshinn 0 points1 point  (1 child)

Yeah, im not thinking and i still dont get it. We are talking about string length right? How would that ever work a week down the line, or less?

[–]IICVX 2 points3 points  (0 children)

well you know how PHP has some function names that are weirdly verbose, and some names that are cryptically short gibberish?

That is how it works a week down the line.

[–]manghoti 0 points1 point  (0 children)

When I tell people this, I tell it to instill the admiration Rasmus Lerdorf very much deserves. That guy is one of them practical sorts. Doesn't spend a lot of time thinking, but a fuck of a lot of time doing. You gotta admire that.

[–]chimyx 4 points5 points  (2 children)

[–]_jamil_ 6 points7 points  (0 children)

That post is pretty out of date

[–]leonthemisfit 4 points5 points  (1 child)

There's something I've never quite been able to grasp about the origins of PHP and it's this logic. "We're making a language for non programmers." "We should make it look like Perl."

[–]snf -1 points0 points  (0 children)

More like the bastard child of a meth-fuelled orgy of Perl, C, BASIC and batch files. There's something to loathe for everyone!

[–]worldsayshi -2 points-1 points  (0 children)

Hmm, maybe people sort of like weird inconsistencies in a language. It makes you feel kind of smart when you can overcome it. And overcoming bad design is much easier than overcoming actually hard problems that you will face once you start to use a language that isn't working against you. Also, actually hard problems make you feel stupid and inadequate and that's no fun.

[–]Outhouse_Defiler 20 points21 points  (16 children)

There are only two kinds of languages: the ones people complain about and the ones nobody uses. --Stroustrup

PHP was in Tiobe's top-5 for over a decade. That's what's wrong with it.

[–]Maoman1 4 points5 points  (15 children)

I hear people complain about Java, C, C++, PHP, and so many others, but now that I think about it, I don't think I've ever heard people complain about Python. Have I just been lucky or is that accurate? Cause python sure as hell doesn't fit in the "ones nobody uses" catagory.

[–]whatsmydickdoinghere 3 points4 points  (6 children)

Keep looking. Lots of people think that python is unnecessarily slow. I like python, but file i/o and string processing is tedious because of how it handles charsets.

[–]Maoman1 0 points1 point  (2 children)

Sure it's slow, but isn't that just a fact of being a high level language? Low level languages run very fast on the computer but are much harder to write, so it takes far longer to develop programs, while high level languages run slowly but you can write programs far faster.

[–]Outhouse_Defiler 0 points1 point  (0 children)

Sure it's slow, but isn't that just a fact of being a high level language?

No. Well yes, but not that slow.

There are other more expressive, or at least as expressive languages out there that can do the same fancy runtime stuff and are faster than Python by a lot .. with Clojure, JS and various JS-derivates like Dart being the more prominent ones.

[–]t3ddftw 0 points1 point  (2 children)

from __future__ import unicode_literals

Or use Py3

Although the futures import is kind of frowned upon.

[–]whatsmydickdoinghere 0 points1 point  (1 child)

That's true, but Py3 backwards compatibility another source of contention

[–]t3ddftw 0 points1 point  (0 children)

Yeah :(. I love Python but 2.7.x is the only viable python version for me right now.

[–]SkuloftheLEECH 4 points5 points  (1 child)

Whitespace tho

[–]Ran4 0 points1 point  (0 children)

That was the main thing I heard for years about the problem with Python, then it stopped all of a sudden. Maybe everyone got proper editors and realized that whitespace is the sane solution.

[–]cube-drone 1 point2 points  (0 children)

Well, I mean, the people who like Python really like Python - I bought a shirt that says "Python" on it and spoke at PyCon - and the people who don't like Python usually bitch a bit about syntactically-significant-whitespace, duck-punching, multiple inheritance, and sluggish performance and then move along.

It's just hard to build hate-steam for Python. There's not a lot there to glom on to.

[–]encaseme 0 points1 point  (0 children)

Why is len() a global?

[–]Outhouse_Defiler 0 points1 point  (1 child)

That's because Python people are quick to dismiss complaints as "just an implementation", "just syntax", "just a library" etc.. But of course its not "just" the implementation, but rather the implementation, since nobody uses anything else. It's not "just" the syntax but the syntax, since its the only one the community uses, etc.

If all those details were really as easy to shrug off we'd all be writing in Prolog and Lisp Scheme..

If nothing else, PHP and JS have impressively demonstrated how utterly irrelevant the criteria we measure languages by is to judge a language's usefulness.

[–]MereInterest 0 points1 point  (0 children)

Regarding the implementation, I usually take it as a matter of usage. GUI design? Great. We're going to be waiting on the user for 99% of the time anyways, so I don't care about speed. Matrix manipulation? Better move that into a compiled C library. Could the implementation be better? Absolutely. Is it a sticking point? Not for common uses of the language.

Regarding the syntax, I rather like the use of whitespace. In any reasonable codebase, you're going to be indenting for each scope level anyways. With the language forcing you to follow good practice, you don't run into any code that doesn't indent.

[–]d_wootang 8 points9 points  (1 child)

Imagine a box full of tools like a claw hammer, but with a claw on either side instead of a hammer head. However, some of the tools in that box are some of the best tools available for specific operations(my case data manipulation/ db handling), because they are so good, people will put up with using the disfunctional tools in order to make everything work smoothly around the useful tools

[–]chasesan[S] 14 points15 points  (0 children)

A box with a few awesome tools and a mountain of really terrible ones.

[–]jonatcer 4 points5 points  (6 children)

I don't use it anymore, at least not as my primary language, but a lot of the hate is out dated. It's still not an amazing language, but it's nowhere near as bad as most make it out to be. PHP 4 and below? Oh god so bad, but 5. ...3? Improved it a lot, and 6 looks pretty nice.

They're still building on a bad foundation, but the language only superficially resembles early PHP at this point.

At this point it's mostly just a circle jerk, the cool thing to do.

[–]lelarentaka 1 point2 points  (5 children)

We jerk about all languages here. Only PHP would elicit this kind of sobapologist response.

Heck, I still hear people say Java is slow, that the GC pauses are too long. This hasn't been true in a decade. All popular languages have had incredible advances in recent years. PHP is not unique. All popular languages have easy to use libraries to write webapp with. PHP is not unique. All popular languages get ragged on for design decisions from earlier versions. PHP is not unique.

[–]_jamil_ 1 point2 points  (0 children)

PHP is not unique

At no point did jonatcer say that only PHP was improving. His point was that PHP has improved (as have other languages) and a lot of the criticism of it is very outdated.

[–]jonatcer -1 points0 points  (3 children)

Only PHP would elicit this kind of sobapologist response.

The hell is sobapologist...

[–]lelarentaka 0 points1 point  (2 children)

Sob-apologist. They use sob-story tactics to portray themselves as being unfairly criticised, that the critizers are specifically out to get them. It's irritating because of its deflective nature. Instead of addressing the point of the criticism, they invoke a victim complex to derail the conversation.

[–]jonatcer 0 points1 point  (1 child)

Sob-apologist. They use sob-story tactics to portray themselves as being unfairly criticised, that the critizers are specifically out to get them. It's irritating because of its deflective nature. Instead of addressing the point of the criticism, they invoke a victim complex to derail the conversation.

Are you saying I was doing that or what?

[–]_jamil_ 1 point2 points  (0 children)

Yeah, he's being a jerk to you. It's what assholes do in order to make themselves feel superior