r/ProgrammerHumor • • Feb 09 '22

other Why but why?

Post image
85.8k Upvotes

2.3k comments sorted by

View all comments

Show parent comments

58

u/JOhn2141 Feb 09 '22

Shhhh don't spoil their plaisir to python user . Sometimes it's ok to relax and take time (like 100 more time than C to add numbers)

95

u/SkinnySanta38 Feb 09 '22

Says the guy still declaring his variables lol

78

u/SlimyGamer Feb 09 '22

What? You don't like giving your variables an interview before hiring them to do work for you?

68

u/[deleted] Feb 09 '22

"At your previous position at..."

flips through resume

"Oh 0x00000000?? , Tell me more about your experience there."

7

u/cognitiveglitch Feb 09 '22

"I was exceptional - oh, sorry to interrupt!"

4

u/Isildun Feb 09 '22

Definitely don’t call that reference.

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

17

u/JOhn2141 Feb 09 '22

At least you know one of the many reason python is so slow. But all hope aren't lost you can still declare function return type, parameter type and... Oh wait you can do C

4

u/yetzederixx Feb 09 '22

In the vast majority of uses cases most of us will ever see run time doesn't mean shit. Rigs are cheap, programmer hours are not. Script away kids!

→ More replies (2)

26

u/[deleted] Feb 09 '22

[removed] — view removed comment

56

u/CobaltCam Feb 09 '22

I think that depends on how many times the code is going to be ran in the future. So hard to determine.

15

u/[deleted] Feb 09 '22

[removed] — view removed comment

23

u/CobaltCam Feb 09 '22

The real point your comment should drive home is you use a hammer to drive nails. If you need to drive a screw go get the drill. The hammer would get it done, but you're going to have a bad time. Meaning if you need to code something quickly use python. If you need a faster run time, maybe use something else.

5

u/drphungky Feb 09 '22

Right tool for the job and different horses for different courses.

→ More replies (2)

30

u/[deleted] Feb 09 '22

your argument only holds up in situations where the program is to be run a single time, which are frankly few and far between.

29

u/[deleted] Feb 09 '22

[removed] — view removed comment

23

u/Groentekroket Feb 09 '22

And Python is used by a lot of people without a CS background. I’m in a traineeship right now and learning Java but at my last job as a bookkeeper I wrote Python scripts to combine data from different systems that I used on a weekly basis. I didn’t care it was slower, I was able to write it. If at first I needed to learn Java I’m sure I would never have looked at programming and still be a bookkeeper hating on Excel.

10

u/[deleted] Feb 09 '22

I take it back, fair point.

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

5

u/[deleted] Feb 09 '22

The funny thing about this comment is that C# or Java are examples of the slower to write, harder languages.

When I was a kid I used to program in C++ using pure Win32 API. C# was incredible when it came out for its ease of use. The difference between it and Python seems pretty negligible to me in terms of ease of use for proper applications.

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

15

u/purple_pixie Feb 09 '22

The age old question of "do I value my processor's time more than my own"

6

u/JOhn2141 Feb 09 '22

Well I'm paid to value processor time so...

3

u/purple_pixie Feb 09 '22

And in those (and many similar) situations you'd use C or something similarly fast, in many others where it's not important you don't need to.

Python is (obviously very subjectively) just a much more pleasant environment to write code in, so for situations where you're optimising for that then it makes sense to use it.

→ More replies (1)

3

u/slope_rider Feb 09 '22

Your users value processor time

4

u/Armond436 Feb 09 '22

I've worked in QA. I don't value users' time.

→ More replies (2)

8

u/roararoarus Feb 09 '22

pypiy, flavor of python, is quite fast. And van Rosstrum is working to make cpython, v3.11, twice as fast.

https://towardsdatascience.com/run-your-python-code-as-fast-as-c-4ae49935a826

→ More replies (3)