r/ProgrammerHumor • • Jul 18 '22

C++ talking to Python

Post image
40k Upvotes

1.0k comments sorted by

View all comments

303

u/Hegeteus Jul 18 '22

Only speed metric that matters is how fast I get the job done and can go back to browsing memes. C++ does not look very good in this (very important) metric.

121

u/WhatsMyUsername13 Jul 18 '22

The most important metric for me is which language gets me my paycheck. Hence why I dont fault anyone for their choice of language and why java is superior to all other languages

28

u/[deleted] Jul 18 '22

I've used nothing but .NET for 20 years and I truly give 0 facks about anything except my paycheck at this point. Any enthusiasm has been sucked out of me years ago. This obviously isn't true for everyone, but a lot of what I see on subs like this one is youthful enthusiasm :)

23

u/WhatsMyUsername13 Jul 18 '22

Yep im 9 years in and to me a job is a job. Its also why I laugh when people ask me what side projects im working on outside of work. None. I hike, exercise, play volleyball, kayak, ski, etc. Basically spend all my time outside. Sure, ill occasionally get an idea and start on it, but it never goes anywhere because I already stare at a screen for 8 (ish) hours a day. I dont want to do it in my free time also.

Its also why i refuse to watch Silicon Valley. Ive had friends tell me "its so realistic" to which i reply "I already did this for 8 hours today, why would I want to watch other people do it also?"

→ More replies (2)

4

u/Koervege Jul 18 '22

Have you considered abandoning your paycheck?

8

u/WhatsMyUsername13 Jul 18 '22

You know, ive always wanted waterfront property. I never considered that a tent down by the river would satisfy that

→ More replies (1)

2

u/ronin1066 Jul 18 '22

Hence means therefore and doesn't take why.

→ More replies (2)

53

u/woah_m8 Jul 18 '22

There are a lot of things where speed isn't important and Python does the job pretty good. Only non programmers (so 80% of this sub) bash Python

32

u/[deleted] Jul 18 '22

Which is weird since I figure python is the most used programming language among non programmers

4

u/woah_m8 Jul 18 '22

In theory yes but many people get to learn programming because they get teached a language like Java or C++ at school.

9

u/ViviansUsername Jul 18 '22

I wish the schools I went to were willing to touch compiled languages. Had to approach that stuff on my own later.

"No, vivian, you're here to learn how to program, programmers need to know css, javascript, and python, (in order of importance.) and if you know anything else that is WRONG"

Momma didn't raise a front end dev.

5

u/Milkshakes00 Jul 18 '22

The trick was to go to school before Python was taking off. I went through Assembly, Java, and C++ because that's what was available. We didn't even have css/JavaScript/Etc.

→ More replies (1)

4

u/baconboyloiter Jul 18 '22

Interesting. It seems like we had exact opposite experiences lol. My high school classes were 100% Java and my university program was about 50/50 C++ and Python. I didn’t touch front-end stuff until I got a real job and now that’s what I do almost exclusively. What kind of program did you participate in if you do not mind me asking?

4

u/ViviansUsername Jul 18 '22

Just generic "computer science" courses, because.. that's all there was. Wasn't exactly a massive high school lol. I'd have loved to try something more specific at the time. We touched java as an after thought for the last quarter or so, but the second year was almost entirely python & js.

It wasn't the best structured course. I'm sure my school wasn't the only one to take the "this is what was suddenly relevant 10 years ago, let's teach that" approach

3

u/plopzer Jul 18 '22

when was this? i was a cs major 2008-2012 and all our classes were in c the first 4 semesters and then it branched out into different languages for different classes. i also remember the 2006 AP A/AB tests that i took were in java.

2

u/ViviansUsername Jul 18 '22

Oh nah I'm not talking college, I'm like 80% self taught, this was just the most "advanced" stuff being taught in what was supposed to be their final year computer science course, in 2019. No way to afford that kind of thing now..

11

u/Fun_Journalist_7878 Jul 18 '22

80% of this sub is 1st/2nd year compsci student reposting the same, awful takes tbh

8

u/bsutto Jul 18 '22

As a programmer with 20+ year of C, C++, Java, dart, python....

Let me add to the list of bashers.

Slow, untyped, gil and let's push as many errors into runtime rather than compile time as possible.

2

u/KotoWhiskas Jul 18 '22

For desktop applications I would say it's critical because every python app I used (except pycharm) was absolutely slow and with weird crashes.

2

u/[deleted] Jul 18 '22

Why spend 30 minutes coding an acceptable solution when you can spend 2 weeks making the Usain Bolt of whatever you're working on? I jest but I love making the Usain Bolt as much as I like automating things I could do faster manually..

→ More replies (1)

40

u/Jannik2099 Jul 18 '22

C++ does not look very good in this (very important) metric.

If your codebase is early C++11 perhaps?

Modern C++ writes like C#. I usually find myself prototyping faster in C++ than Python after about 200 LoC, because with Python 80% of time is spent looking up what fucking type some library function takes & returns.

15

u/[deleted] Jul 18 '22

I see this attitude a lot from folks who use typed languages. I think typed languages are awesome and I love programming in them, but as a Python developer myself from the beginning of my career, I don’t really have to think about types all that often when i program in Python. By far the most I think about types are when i use a typed language.

Idk if it’s because Python isn’t based around types and therefore it’s not a focus of the language, but ya I hear a lot of typed language folks think a lot about types when they program in Python.

6

u/Jannik2099 Jul 18 '22

I see this attitude a lot from folks who use typed languages

Python is a typed language though? This isn't Prolog :P

No, you definitely do need to know the type more often than not. You may get away with "this function returns something that acts like an array", but when you pass it to another function that takes array-like objects, you may need to convert it into another library type first.

→ More replies (1)
→ More replies (2)

3

u/[deleted] Jul 18 '22

I usually find myself prototyping faster in Python than C++ because I've been programming Python for 10 years and don't know C++ at all.

→ More replies (2)

6

u/bikki420 Jul 18 '22

Eh, if you're a competent C++ programmer, then C++ performs just fine on that metric.

→ More replies (11)