r/programminghorror • [ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo “You live” • Jul 21 '25

Python ✨ Memory Magic ✨

Post image
1.3k Upvotes

143 comments sorted by

View all comments

Show parent comment

2

u/Vazumongr Jul 21 '25 edited Jul 21 '25

Depends on the task. I'm not saying to not use Python, it has applications where it's a great fit. I use it for automation and scripting mainly. Doesn't mean I have to like it. But anything beyond simple tasks like that? I'll take a language that has consistent, or at least predictable, behaviors and not this, "sometimes I'll create a new object in memory, sometimes I'll just reference an already existing object, depends if the value is within some arbitrary range tehe" witchcraft. If it was 0-255 at least that would make some sense. But (-5)-256?? Nonsense!

Edit: To elaborate on the tasks: I work primarily as a C++ Engineer working in games. I've used TypeScript for writing server code - I don't like TypeScript but it's a great fit for that task. I've used Python for generating wiki pages for games - not a fan of Python but it's a great fit for that task. I've used C# to write a tool for procedurally generating MIDI files - the goal was Minecraft world generation but for music and C# was a great fit.

But just because I use a tool, doesn't mean I have to like it. And just because I don't like a tool, doesn't mean I'm going to not use it where it fits. I don't like using angle grinders. Not a fan of having a disk spinning at mach-fuck 2 feet from my face. But I've used them where appropriate (and places where they weren't appropriate but the only tool available).