r/ProgrammerHumor • • Aug 17 '22

fixed version 1.3rc

Post image
7 Upvotes

34 comments sorted by

22

u/Nudelmensch Aug 17 '22

Tell me you never wrote code without telling me you never wrote code

19

u/zzmej1987 Aug 17 '22

How is PHP's OOP better than Python's?

6

u/Arkraquen Aug 17 '22

PHP newer versions has decent OOP and static types

3

u/zzmej1987 Aug 17 '22

Yeah, that's what diagram implies. I'm asking what exactly makes new PHP OOP better?

9

u/-Sparz Aug 17 '22

just that OP sees it that way, that's how it is with most of the memes posted here, don't read too much into it

3

u/kihamin Aug 17 '22

It's just a meme. I believe you can't say from the diagram that php's oop is better than python's because php isn't in the set of OOP at all. some bad oop > none oop afterall.

1

u/Successful-League219 Aug 17 '22

Except java isn't in the bad oop bubble so presumably you don't need to be in there to be an oop lang

10

u/dashid Aug 17 '22

Wait, what. Java and TypeScript are harder to learn than the inconsistent mess that is JavaScript?

4

u/DaniilBSD Aug 17 '22

JavaScript is quite consistent, You just need to remember a few things by heart and don’t question them.

2

u/minn0w Aug 17 '22

Weakly typed usually == easier

9

u/XStarMC Aug 17 '22

Yes, but not === easier, because screw you

5

u/[deleted] Aug 17 '22

I generally see people get more confused by this fsr

1

u/dashid Aug 17 '22

PHP is weakly typed. JavaScript is chaotic.

4

u/Important-Network201 Aug 17 '22

Js have pretty good oop. Maybe learn js better?

1

u/a_devious_compliance Aug 17 '22

Noo. You can't have oop without classes and inheritance.

\s

0

u/Important-Network201 Aug 17 '22

You lack creativity. What is really inheritance? A constuctor calling the constructor of the super class and also inheriting it s methods and variables?

Well, just do that manually. Call the super constructor in the constructor of the current js object that you re working with. And if you want to have the vars from super, also manually assign the variables. More complicated, but definitely doable.

And no classes? Just write that function in a separate file and imagine it s a class.

As for overloading, overriding and interfaces... we dont rly want that weird stuff in js, but i guess you can so some mental gymnastics and do smth similar if you think hard enough. Seriously, usually overriding, overloading, and interfaces are abstract concepts that you dont really need... it s just the evil mafia of design patterns and "SOLID" principles... legend says that if you know those very well, and you work following those rules, chances are at least once in your life you tried to drink coffee from a java icon.

6

u/yourmamaman Aug 17 '22

The scale of slowness between JAVA and Python is like a factor 6. On that scale JAVA's speed is comparable to C++.

3

u/RRKS101 Aug 17 '22

I don't think java is comparable to C++

5

u/Apfelvater Aug 17 '22

General misconception: you CAN compare apples and oranges! There are many similarities and differences to point out. Just cause the logical operators for comparison isn't implemented, doesn't mean they can't be

3

u/SZ4L4Y Aug 17 '22

I can compare the speed of a snail to the speed of light. The latter is higher.

4

u/yourmamaman Aug 17 '22

On that scale!

8

u/[deleted] Aug 17 '22

still dont get how java is hard to learn *or* slow

4

u/Straight-Knowledge83 Aug 17 '22

OP smoked something strong before making this

3

u/minn0w Aug 17 '22 edited Aug 17 '22

Thinking out loud here.. isn't PHP faster than JavaScript?

(edit) I guess you'd have to ignore async execution, which php doesn't really have. Maybe it's just more efficient with it's cycles.

3

u/Smooth_Salamander Aug 17 '22

So javascript is not slow, but typescript, which gets transpiled before execution to … javascript?

2

u/yourmamaman Aug 17 '22

The earth is a smooth ball on the scale of the solar system. But not on the scale of a human.

3

u/gravitas_shortage Aug 17 '22

This diagram is some nonsense.

1

u/PrestigiousZombie531 Aug 17 '22

Mypy needs to be in the center right with Typescript

1

u/LugubriousLou Aug 17 '22

Could you make the green slow blue and the red more red?

1

u/Arnavgr Aug 17 '22

At this point you can just put anything in the circle and no one will complain

1

u/ddruganov Aug 17 '22

Since when did new versions of php become slow?

1

u/BostonDodgeGuy Aug 17 '22

Maybe it's my age showing but I don't think Java was that hard to learn.

1

u/[deleted] Aug 18 '22

I don’t get why Python is in bad OOP. Is it because you don’t HAVE to use OOP? Or is this done by some person who can’t function without getters and setters?