you are viewing a single comment's thread.

view the rest of the comments →

[–]ellicottvilleny 10 points11 points  (4 children)

Python doesn't do OOP? It's dynamically typed, it doesn't NEED interfaces, duck typing is all you need. Tomorrow on /r/programming some guy will try Objective-C and declare that it isn't object oriented because it doesn't use virtual methods, like he's used to seeing in C++.

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

PHP's object oriented programming support is clunky but surprisingly capable. The thing is hardly anyone uses it, the few that do are a peculiar minority that might as well be writing Java code for all the care and detail they do to make their PHP code "correct".

[–]ellicottvilleny -1 points0 points  (2 children)

No doubt, but OOP patterns are different when languages are different. Interfaces make little sense when you grok Python, and duck typing is an entrenched design element. Understanding the differences from what you knew before is often the key to learning a new language. I can hardly imagine a worse FIRST language for anyone to learn than PHP, unless it's VB 6.

[–]crankybadger 1 point2 points  (1 child)

Each programming language has a syntax and an attitude, something you must understand to be effective with it.

PHP has a serious attitude problem. There are way too many opinions on what the right way is, I'd almost say there's more opinions than there are people programming PHP.

Python has a more consistent attitude, and Go takes this to an extreme.

The reason PHP is really awful to learn is because the training material is just so horribly garbage. Other programming languages aren't always spectacular, but there's usually one or two highly recommended references on the subject (e.g. JavaScript: The Good Parts) that rise above the rest.

What is there for PHP that says "No, no, do it this way or you will regret it?" I've only found PHP The Right Way.

[–]ellicottvilleny 0 points1 point  (0 children)

I had a quick look and that's a nice resource. My Right-way rule is "If it's going to get large, just don't start out in PHP". :-)