364
u/LucyShortForLucas 2d ago edited 2d ago
There is no such thing as switching from C++ to python or vice versa, they are orthogonal tools
67
168
u/Llonkrednaxela 2d ago
Shh, the CS101 userbase of this subreddit doesn't pick languages based on the task and what management demands, they use the language the professor told them to use in the assignment.
97
u/Kusko25 2d ago
That sounds like picking the language management demands
38
u/chilfang 2d ago
Shhhh we in CS 102 need to lord over our lesser somehow just give us this
1
u/rorodar 18h ago
What would you even do in cs102? After the basics you need to do specific stuff, no? I took intro to cs and then ds, oop, next sem algos and probability.
2
u/DoctorMakar 13h ago
It's pretty common for 101 to be basic programming and then 102 to be basic OOP programming. Not 100% universal though and many places that have this structure still have a separate OOP course too.
14
u/Actes 2d ago
Or if you work where I work. They just use java.
Is it scripting? They're gonna write it in java
Is it an API? Probably in java
Is it anything? "Seems like a good use case for java"
God I hate java, one thing I'm happy about AI for.
4
u/zabby39103 2d ago
Okay for scripting that's kind dumb, but otherwise Java is versatile and powerful, and light years ahead of stuff like Python for stuff like multithreading. What version are you using at work? Is it an old one or something? Are you using a good IDE like IntelliJ?
1
u/Actes 1d ago
We should just be using go we run a search engine on my team via SOLR and honestly the 16 years of springbean hell has taken its toll.
1
u/zabby39103 1d ago
Right, yeah, early Spring did too much "magic", and that magic hid the inner workings... until shit crashed. The current best practices are less that.
GO is a good algorithmic language, not sure how it replaces a full featured framework like Spring though?
1
4
→ More replies (2)6
203
u/DobryBobry 2d ago
183
u/EuenovAyabayya 2d ago
Seven years is a respectable repost interval on reddit.
96
u/DobryBobry 2d ago
The funniest part there is more:
5 years ago
another 5 years ago
4 years ago
another 4 years ago
3 years ago
And there is even more72
u/firecorn22 2d ago
We treating this sub like stack overflow now?
68
15
u/Help_StuckAtWork 2d ago
Course not.
If it were stackoverflow, I'd be posts about going from java to python.
4
2
u/frogjg2003 2d ago edited 1d ago
This sub does have repost rules. It's just a reasonable one that only limits it to recent reposts and top all time. This post doesn't violate that rule.
4
u/firecorn22 2d ago
totally agree, spam reposts should be removed but anything older then a year is fair game since there probably a new batch of engineers who ain't never seen it before or just missed it last time
1
u/CitizenPremier 2d ago
No, but ask yourself how you think this came to be posted again, by an account with hidden comments
3
13
u/ShakaUVM 2d ago
That one had "speed" on it and so was much funnier
This is a repost of a similar one from a year ago
9
u/SenoraRaton 2d ago
Imagine stealing someones meme, taking the time to consciously edit it, removing the best part of it, and then reposting it.
1
u/rooster_butt 2d ago
I feel like the original meme image didn't have speed. Speed looks to have been edited in the 7 year old post. No rounded corners and different font weight.
3
3
2
u/bendstraw 1d ago
Maybe an unpopular opinion based on your upvotes but like 7 years is an acceptable repost period
2
67
83
u/wett-puss-lover 2d ago edited 2d ago
So long mutable strings as well 👀
Edit: i got immutable confused with mutable
29
u/JanEric1 2d ago
Aren't python strings immutable
17
u/wett-puss-lover 2d ago
I got immutable and mutable confused. In python, strings are not mutable, that’s what i meant
55
u/NecessaryIntrinsic 2d ago
3
2
u/the_horse_gamer 2d ago
inflammable = capable of being inflamed
flammable = capable of being flamed
4
2
24
u/EveryCryptographer11 2d ago
Wouldn’t it be the other way around? Why will you “graduate to Python” from C++ ? ? 🤔
7
u/phantom94 2d ago
Python dev here. Started om Java and C. Never thought I would do python until I got an internship which required me to do python. Even though what I did then was totally differen what I do now it still is the basis of my career. Sometimes the “graduation” will just be chosen for you
→ More replies (1)3
u/9_Sagittarii 1d ago
I started with Java, then used C#, and in my current job use Python. I just use whatever the company tells me to use/whatever their codebase is written in.
3
1
u/FluffusMaximus 1d ago
Most Python “devs” in here can’t understand pointers, let alone C++ as a language…
10
17
u/ubd12 2d ago
Maybe it's me but I don't get it. I get the meme, but please explain to me why python is considered so much easier than other languages.
I think a lot of it has to do with the fact that it is interpreted and the toolkit that it attracts, not the language itself. Having something that's interpreted and as someone normalize grammar, that's the attraction to python. The look of the language is much more forced as well. (No K&R versus ANSI debates)
If Perl wasn't so junky/hacky, perl would still be a major language and probably a lot faster. I like Perl a lot by the way so I'm kind of beating up my own language of choice.
26
u/CaffeinatedT 2d ago
why python is considered so much easier than other languages.
Reddit (and the software industry generally) is loudly dominated by web developers and API integration script developers.
10
u/userhwon 2d ago
Python originally wasn't a typed language. You didn't have to declare variables, you could just use them, and that got a lot of squinting out of the way for people who just wanted to do things. And it had lists, which were a complicated object masquerading as a simple one. And you didn't need functions, not even main(), so you could write a file that acted as a script but was cleaner than all the scripted languages, which were hamstringed by a long history of being slowly evolved from commands typed into a shell prompt.
There was no compiling and linking, and there was a lot of complex stuff built in so there was very little including.
Now, though, Python is pretty complex itself, you have to include a lot, and often you're compiling because you're using it for something serious and it needs to be performant, and versioning can easily bite you in the ass.
Perl was the OG alternative that filled exactly the slot between compiled and shell-scripted programming that Python now owns, but it had a habit of being arcane, with even more syntactic conjuring than Python now does. And it was fast as fuck. If it was as easy to pick up as Python was originally it probably would have kept Python at bay. I think Larry was more controlling than Guido, too, on top of open source not being as mature a community, so it didn't evolve nearly as fast.
5
u/ubd12 2d ago
One of the things I actually loved about Perl was its philosophy of TMTOWTDI — “There’s More Than One Way To Do It.” It made Perl incredibly expressive and powerful, but it also let you shoot yourself in the foot.
Python deliberately went almost the opposite direction: “There should be one—and preferably only one—obvious way to do it.”
That difference matters more than people sometimes realize. Perl was very much a write-first language. If you were disciplined, you could write some incredibly elegant Perl. I was always able to come back to my own code six months later and understand it. But the language didn't force much structural discipline on you, so two Perl programmers could solve the same problem in completely different ways—and neither solution necessarily looked obvious to somebody else.
Python's philosophy makes the codebase itself more consistent. You give up some of Perl's freedom and cleverness in exchange for code that is much easier for the next person to read.
As a manager, though, I'd probably choose Python. With Perl, you could end up with a codebase where understanding the software meant understanding the mindset of the developers who wrote it. Every team, site, or even individual programmer could develop its own conventions for how things were done. It was almost democratic: the language gave everyone enormous freedom, and the resulting code reflected the people who wrote it. That's great for individual expression, but terrible for organizational continuity. With Python, the language itself imposes more of the culture. There are still different ways to write Python, but the language strongly nudges everyone toward the same conventions. That means somebody can walk into a codebase without first having to learn the personality and philosophy of every developer who touched it. From a management perspective, that's a huge advantage: you aren't just managing code; you're managing the cost of replacing the people who understand it.
I also loved it because it kind of enforced most of the Pearl was in the executable. It's weird but I worked at two shops where the sis admin were terrible. Every time that I invoked python something was not properly installed where is as long as I used Perl native calls, I still could actually get my code to work. It's amazing that you had to code around the system but perl is more resistant to non-standard installations or breakages of the packages
3
u/mina86ng 2d ago
Python originally wasn't a typed language. You didn't have to declare variables, you could just use them,
Perhaps not so ironically, this is what makes Python unsuitable for large projects. I’d rather work on large C++ codebase than large Python codebase. (Yes, I know Python has type hints, but once you start using dependencies, you discover how much of a mess type hints are).
4
u/Far_Tap_488 2d ago
Also, fuck how python expects you to import other files if you have a decent project structure.
2
2
→ More replies (3)2
u/zabby39103 2d ago
Python is easier for people to do computer science assignments in in university.
It's dogshit for anything that's enterprise at scale. I don't understand what anyone sees in it outside of university. The multithreading alone is disqualifying. Anything it does good, it does good because it's delegating to C++ libraries.
→ More replies (8)
9
12
u/DJDevon3 1d ago
This meme is 80% false.
Everything except pointers exist. Pointers in Python are basically just variables without an explicit hardware memory address. You can substitute multi-dimensional arrays for dicts or lists quite easily and with json have easy access to them without nested matrices.
What makes Python seem easier is that memory allocation is handled automatically. That is also a downside if you want that kind of control. C is faster for a reason but also more strict to code.
A better meme would have included "30 minute compile time" where as Python is almost instantaneous. So you forgot a comma? Now you have to wait another 30 minutes to compile! You give up the pre-compiled speed advantage for faster iterations & testing.
The biggest difference has nothing to do with syntax. It's iteration speed vs program speed. Today everything is in a perpetual "beta" state so iteration is king and Python is a more efficient use of a programmers time.
2
u/Altaruss28 23h ago
> "C is faster for a reason"
memory management being automated has relatively little to do with that, it being an interpreted language rather than a compiled one and then dynamic typing forcing it to constantly guess what it's even supposed to be doing contributes far more
> So you forgot a comma? Now you have to wait another 30 minutes to compile!
no you don't, you use a build system which keeps intermediates around so it doesn't have to recompile everything every time such as gnu make, I don't know what sort of a project would take 30 minutes to build to change one file and relink
25
5
u/carloom_ 2d ago
I've never had the issue of when to use python vs c++. Basically you are tradiding developing time and speed for performance.
Creating a fast program in Python is much harder because you don't have control. C++ instead let's you be as close to the metal and even compute stuff at compile time.
A better meme would be contrasting C++ and Rust or Python and another language with the same use.
1
u/Unfair_Decision927 1d ago
Yeah normally you would use python (or something similar) for the main application, then any resource intense subroutine you write in C++ (or something similar) to eek out the performance.
5
u/the_real_Spudnut2000 2d ago
So long int main(){}, hello:
```python def main (): ....
if name == "main": main() ```
10
4
19
u/Asmophel_noe 2d ago
Everything as in objects,datatypes, functions in python are a pointer, why larping
11
u/huuaaang 2d ago
References are not pointers. Like it’s not a direct memory address.
2
u/Asmophel_noe 2d ago
Mb, I mean it just doesn't do pointer arithmetic like in other langs u can't manipulate it but still it's a reference idk if I would just stop calling in pointer
1
u/huuaaang 2d ago
I think it only gets muddy in Go where they fo have pointer syntax. You can pass by value or pointer. But it’s not a memory address. It’s got more metadata than just the memory address.
6
u/MadCatMkV 2d ago
When you switch from c++ to python to c++ again:
THANKS GOD FOR COMPILATION ERRORS! I'M TIRED OF MAKING UNIT TESTS TO GUARANTEE STUFF LIKE CORRECT TYPING
2
3
3
3
u/MrHyperion_ 2d ago edited 2d ago
Pointers are hard to give up. I also dislike not having statically typed language because it makes IDE autocomplete worse
3
u/_Decimation 2d ago
With C++ you get the best and worst of both languages' type systems (or lack thereof):
You trade Python's implicit weak typing and runtime type errors for C++'s strong typing and indecipherable static compiler errors
3
6
5
u/userhwon 2d ago
You'll be back when you realize your performance is glacial.
1
6
u/Coulomb111 2d ago
* Reposted very often
* Not even a funny meme
* Please stop youre embarrassing yourself
7
u/MrWilliam932 2d ago
3
1
1
u/zabby39103 2d ago
They never overcame their skill issues and gave up. Python is only ever good when it delegates to C++ libraries lol.
3
u/Elathrain 2d ago
Ok, but ++ tho? One of my favorite syntactic sugars, why are celebrating giving that up?
1
2
2
2
u/spitfire451 2d ago
I put semicolons at the end of each line in python. Because I like it and that's where they belong.
2
2
2
u/RepulsiveRelative147 2d ago
I made my first small project on python and damn... I want to go back to c so badly , c has a defined Syntex while u can add or have more freedom in python I never had this many syntax error in c 😭😭
2
u/tobedeadguy 1d ago
So used to cpp that python breaks my mind
1
u/scissorsgrinder 1d ago
My first reaction to Python was "back in my day...." and "kids these days..."
I love it now though. Great for hacky scripts.
2
2
u/NottingHillNapolean 1d ago
The first time seeing a javascript variable given a new value and type in the same scope, my first thought was, "This is unnatural..."
2
u/Pares_Marchant 1d ago
This kind of thing is one of the reasons I could never start javascript, the things you can do with it are so wild that it's very difficult to reason about the code, there aren't a lot "guarantees" that you can have, you have to reason about everything at the same time because you can't really rely on the compiler and types (basically your mind is the compiler).
3
u/Beginning-Ice-9008 2d ago
The only disadvantage is, that you don't think anymore and C++ Developers earn way way way more because they are actually good at programming compared to you.
1
1
u/EvillNooB 2d ago edited 2d ago
When you switch from Python to C++ That_tug_of_war_meme.png
On the left side: Me
On the right side: syntax in C++ and the problem i'm trying to solve
I get that it is explicit, but it is way easier to write in python first, and then to re-write in C++, so first you fight the problem, and then you fight C++, instead of fighting both of them at once
1
u/jamesianm 2d ago
I had spent over a decade of missing semicolon errors training myself to always end a line with a semicolon and I'd finally gotten there, it was instinctual and I never forgot one. One year of Python undid that and then when I went back to languages that required it I was dropping them all over the place again like a noob
1
1
u/LetumComplexo 2d ago
Not gonna lie, I genuinely miss pointers sometimes.
There are so many neat little tricks you can do with them.
1
u/awesome-alpaca-ace 1d ago
mmap a file containing a tree data structure and crawl it via pointers and offsets
1
u/LetumComplexo 1d ago
That might be one of the sexiest things someone has said to me since I started my new job.
1
1
u/nevemlaci2 1d ago
Kind of true. Once you realize that some stuff is just better done in python. But then again, you wouldn't write a C++ refactor tool in python, but you also wouldn't normally do time series post processing in C++
1
u/awesome-alpaca-ace 1d ago edited 1d ago
I've tried post processing GB of time series data in Python. Even the "fast" Python libraries were a ridiculously amount of magnitudes slower than a custom engine written in C++
1
u/nevemlaci2 1d ago
Tell me about it. It takes 50 minutes to process more than 700 GB of data, although the issue is reading the data for us, and that part is written in C++ running on 16 CPU cores...
1
1
1
u/Havatchee 1d ago
Uses actual character for everything else and then just "pointers" like * and & would be too difficult to understand.
1
1
1
1
1
1
1
1
1
u/mad_cheese_hattwe 1d ago
Going from C to Python and thinking whitespace syntaxing is a improvement. SMH.
-3
u/Original_Ad5768 2d ago edited 2d ago
Why is he downgrading
Edit: hi (sorry for bad English)
10
u/JanEric1 2d ago
Do you mean "downgrading"?
3
u/oompaloompa465 2d ago
compiled OOP have superiority complex.
i can understand his feeling, coming from C#. I'm branching to Python too and i feel the challenge7
u/Asmophel_noe 2d ago
Languages are made based on convenience don't just spout bs after all they're languages, saying one is superior other is inferior is just retard behaviour
0
u/molly_jolly 2d ago
Python is the bourgeoisie to the C++ proletariat
0
u/AggravatingFlow1178 2d ago
The vast, vast majority of engineering companies would happily purchase a product that runs 10% slower for 1/2 the development cost. There are few use cases that justify the use of C++
2
0
0
u/perringaiden 1d ago
If you want a truly amusing switch, C++ to VB.Net.
It's a shame they're killing the syntax in favour of C#.
0

1.0k
u/belabacsijolvan 2d ago
theres main() in python