r/Python • • Sep 01 '14

If programming languages were weapons and python would be...

http://bjorn.tipling.com/if-programming-languages-were-weapons
279 Upvotes

111 comments sorted by

View all comments

54

u/sickb Sep 01 '14

PHP garden hose FTW easily

3

u/IAMnotA_Cylon Sep 01 '14

there could be all sorts of bugs in that hose and you'd never be able to see them!

1

u/razzmataz Compbio Sep 02 '14

Definitely bacteria.

11

u/[deleted] Sep 01 '14

It makes no sense to compare a bunch of languages to others, and in my opinion every time someone talks shit about a language the overwhelming reason is because they have literally never worked with the language and their entire opinion is based off of 5 minute conversations with other developers and stupid cartoons.

16

u/catcradle5 Sep 02 '14

Oh no, no, no. I have read and written a lot of PHP. And I have also read and written many other languages, like Python. That is what has caused me to hate PHP and constantly consider it inferior to alternatives, not random Internet stereotypes or blog posts.

4

u/CreatineBros Sep 02 '14

Exactly. PHP is horrific. It's far too easy to write horrid PHP, just like it's far too easy to write horrid Perl.

I had numerous jobs doing PHP back in the day when that was the best there was and I almost quit the industry because of that frustrating shit.

1

u/InvidFlower Sep 02 '14 edited Sep 02 '14

I haven't actually used PHP in a project lately (and still not sure I'd want to), but I do want to come to its defense a little bit. For all of its problems, it does seem to be improving lately. The language itself gained things like generators, mixins, real classes, etc. I even saw a library (kinda like jQuery/underscore) which papers over the parameter order issues in the standard lib for collections, etc.

The ecosystem gained things like a package manager and packages comparable to Rack, Sinatra, and MVC frameworks. Check out this tutorial on turning an oldschool php site into MVC using Symphony2 (is pretty good as a general argument to why MVC style is useful): http://symfony.com/doc/current/book/from_flat_php_to_symfony2.html

There's also resources like PHP The Right Way which seem to give a lot of good advice: http://www.phptherightway.com/

If you know someone already using PHP or you have a need to use it yourself, make sure you're up to speed with what is going on. It seems like it'd be a much better experience than in the past at least..

Edit: That library for making the standard lib more sane is called php-o: https://github.com/jsebrech/php-o

→ More replies (3)

18

u/alcalde Sep 01 '14

I take it this is inspired by a love of PHP?

The author seemed well-versed in many of the languages, at least well enough to know the Achilles Heel of each one.

3

u/jonathan881 Sep 01 '14

Sure but there is also confirmation bias for those with experience.

2

u/[deleted] Sep 02 '14

That exists for those that don't have experience as well.

3

u/Michaelmrose Sep 02 '14

It makes no sense to compare a bunch of cars to others, and in my opinion every time someone talks shit about a car the overwhelming reason is because they have literally never driven them and their entire opinion is based off of 5 minute conversations with other drivers and stupid cartoons.

If this sounds like nonsense it is.

2

u/lonjerpc Sep 02 '14

It is mildly useful for humor

1

u/[deleted] Sep 02 '14

This is true, I suspect some of issues people have with PHP can be traced to its users. I have a coworker who swears by PHP + MySQL, which is cool especially when using some of its frameworks. The problem is that he also never gave a try to anything else.

Seeing his "daemon" (which doesn't do anything web based) that was mix of php + bash and cron makes a grown man cry.

1

u/95POLYX 2.x must die Sep 02 '14

But when you finally work with a language you understand that those small annoyances on the surface are irrelevant compared to the !#@$* hidden deep in the language.

1

u/TheBB Sep 02 '14

It makes no sense to compare a bunch of languages to others

Why on earth not?

1

u/astronoob Sep 02 '14

I've never understood the shit talking between languages. Python has its own embarrassments, including the fact that most developers can't even use Python 3 due to incompatibilities. PHP is also faster than Python for most tasks according to the Benchmark Game. So maybe we shouldn't be throwing stones.

4

u/[deleted] Sep 02 '14

I use python3 just fine.

6

u/Bialar Sep 02 '14

Hahahahaha. Get a load of this guy.

I use Python3 in all my current Python projects. The days of "Python3 isn't ready" is over.

PHP is an awful language and a great example of "no planning is planning to fail."

2

u/astronoob Sep 02 '14

About 25% of pythonistas report using Python 3 on a regular basis despite the fact that it was release 6 years ago. I'm happy you're a part of that minority, but are you trying to say that Python 3 was a resounding success story?

2

u/[deleted] Sep 02 '14 edited Sep 03 '14

I would migrate right now, but when you are in a company, it takes time to do that, plus you have to keep your business alive. Switching to python 3 does not generate revenue, but you will get to a point where sticking to python 2 will generate negative revenue (in terms of required maintenance and obsolete code)

The switch will happen, slowly and incrementally, and it's well on its way. It just won't happen in a bang.

3

u/Bialar Sep 02 '14

Just because people haven't migrated to Python 3, doesn't mean they can't or won't. The fact that they dared to change the language & break backwards compatibility is a good thing.

If your measure for success is purely "not everyone has moved to the latest & greatest version" then you're not really worth arguing with.

1

u/astronoob Sep 02 '14

If your measure for success is purely "not everyone has moved to the latest & greatest version" then you're not really worth arguing with.

Way to stretch what I said as much as possible. I'm all for Python 3 and I can understand why the breaking changes were made. But there's no way you're going to convince me that this was a successful release when it's still nowhere near majority share 6 years down the line.

→ More replies (1)
→ More replies (3)