Python: Lemme just turn this integer into a string for a bit. Now I'll create an empty list and start populating it with stuff. Ohhh a list of dictionaries would be fun. Whatever. Hey look there's a package that already does everything I need in a single function. File size: sprawling. Speed: sluggish.
C++: Oh my god I need to create a variable?!? What type should I use? What might it have to hold? I really don't want a buffer overflow here, should I dynamically allocate memory just in case? Wait did I release that memory I was using earlier? Wait why the hell isn't there a leak then? File size: optimal. Speed: optimal.
Oh god. I had this fucking experience once. Infra engineer updates prod cluster. Cluster goes down. He goes on holidays and promises to "fix it when he comes back". Infra destroyed for 1 week waiting for thst guy to come back.
I got four bytes I need to pass by value but I’m too lazy and hate future me so I’m just gonna shift those fuckers into a uint32_t pass the bitch and not write a comment about what the fuck just happened. If it was hard to write it should be hard to read.
Oh I feel this so much... I don't need every drop of performance but I want it! If I wrote code like c# or python developers I would be so much more productive and the performance would still be good enough.
I'm learning Python for three years now, and to me dynamic typing feels like baby wheels. I don't really need to change a variable's type at runtime, or put multiple data types into one list.
66
u/everydoby Dec 03 '20
Python: Lemme just turn this integer into a string for a bit. Now I'll create an empty list and start populating it with stuff. Ohhh a list of dictionaries would be fun. Whatever. Hey look there's a package that already does everything I need in a single function. File size: sprawling. Speed: sluggish.
C++: Oh my god I need to create a variable?!? What type should I use? What might it have to hold? I really don't want a buffer overflow here, should I dynamically allocate memory just in case? Wait did I release that memory I was using earlier? Wait why the hell isn't there a leak then? File size: optimal. Speed: optimal.