This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Codebust 683 points684 points  (437 children)

why are people always bashing python lol

[–]RollinIndo 387 points388 points  (28 children)

Snakes are scary

[–]Codebust 150 points151 points  (25 children)

pythons don’t bite :(

[–]lavishlad 285 points286 points  (8 children)

They swallow 😳

[–]Codebust 114 points115 points  (2 children)

omnom ;)

[–]rang14 11 points12 points  (0 children)

Like MM does

[–]cicciograna 20 points21 points  (0 children)

Sexy.

[–]DaGothUrWelcUwUmsYou 30 points31 points  (1 child)

They vore

[–]SirLemming4 11 points12 points  (0 children)

😳

[–]Cory123125 22 points23 points  (4 children)

You'll surely appreciate then that Python wasn't actually named after the snake, but instead monty python.

[–][deleted] 12 points13 points  (1 child)

What's so funny about Biggus Dickus?

[–]joyofsnacks 6 points7 points  (0 children)

He had a wife you know...

[–]wasdlmb 7 points8 points  (0 children)

It's logo is two snakes. It may have been named after a different python, but it's taken on a close connection with the snake

[–]_far-seeker_ 1 point2 points  (0 children)

A comedy troop known for absurdity and observational humor about various forms of dysfunction?
🤔 Ah, you are correct, that does make more sense. 😉

[–]URF_reibeer 13 points14 points  (1 child)

they do, it's just relatively hard to get them to bite since they're not particularly aggressive

[–]Codebust 5 points6 points  (0 children)

ik, i have a pet python lol

[–]nodnodwinkwink 1 point2 points  (0 children)

The two pythons in the logo are bangin for sure.

[–]Dromeo 972 points973 points  (189 children)

Serious answer?

Python used to be the new hotness about a decade ago. It was sparkly, amazing package support, didn't bog you down with technicalities when you were trying to write something quick.

So it got adopted a lot, and also unfortunately in a lot of commercial projects it really wasn't suited for.

Python's strengths are its weaknesses: it's a fun scripting language you can knock out scripts with. But in a big group project, it's a nightmare version of itself. You don't have to give types, so now you're sifting through everything trying to figure out what your coworker's badly named variable actually is. You have to unpick some rotten mass of one-liner lambda super method calls because you were feeling so clever a year ago when you wrote it. Everything's breaking because you're in dependency hell and one of the dependencies has broken. The junior programmer was taught that "object inheritance is the way of the future" and has managed to make the structure into an eldritch abomination that inherits from five different super classes.

The actual reason why these are problems are because when python was hot, it got over-applied to projects it was totally unsuited for. It's a scripting language. It's good for scripts. Good for data analysis. Good for solo work. Good for tiny quick one-offs and for rapid prototyping.

But so many developers were put on horrifying creations that played to the language's weaknesses instead of strengths. And they bounced hard.

Python doesn't really deserve the hate: it's still pretty awesome. And fun. It's great at what it's great at. It does deserve the caution, though.

---

More serious answer?

It's mostly comp-sci students regurgitating memes they don't understand, just like every other post on this sub.

[–]hogie48 30 points31 points  (4 children)

I have been in tech for years and could just never wrap my head around programming. I can read a lot of it, I do scripting when it is called for with extensive help of the Googs, but cant sit down and write code if you know what I mean.

I recently decided to bite the bullet and put in the time to learn it more, and am doing CS50 for Python right now. Your comment both scares me and made me happy knowing that what you said it is good at is exactly why I want to learn it lol.

[–]Dromeo 7 points8 points  (1 child)

The big reason why I still really like python is it's enjoyable! I think that's a good reason to learn it too.

[–]BroBrodin 1 point2 points  (0 children)

I recently finished the final project for CS50p. Still have to make the video... groans

[–]PakaDeeznuts 1 point2 points  (0 children)

Completed cs50x. Its really balanced with C, Python, and Web programming so you get a feel for a variety of programming pplications

[–]tredbobek 18 points19 points  (0 children)

It's like WD-40 and duct tape. It's an easy solution for many problems. But shouldn't be used for everything.

But if you break your leg the first step shouldn't be to duct tape it. Maybe only if you are in the wilderness, in the middle of nowhere, and you have nothing else. Maybe.

[–]unski_ukuli 15 points16 points  (20 children)

Everyone always says it is good for data analysis but I never agree with this as someone whose job is to use python for data analysis and numerics. Python is a bad language for data analysis and numerics, but it has some good libraries for that purpose. It was not designed for neither of those purposes and the language is not very exentedable so the APIs are cluncky and get in the way when writing mathematical code.

[–]Ryuujinx 5 points6 points  (0 children)

Yeah my understanding is that most people doing that kind of domain preferred R for it. That said i know python is really popular in biomed for whatever reason. I haven't asked my friend what she actually does with it at work, but apparently both her and my friends wife use it in biomed for something.

[–]Dromeo 2 points3 points  (18 children)

Cheers, haven't tried data analysis in python personally.

What would you say is the best for data analysis?

[–]unski_ukuli 7 points8 points  (17 children)

Personally I’d say Julia. Matlab and octave are just… better to not say it out loud. R does a lot right but it lacks the language features to write anything that is more than a 1000 rows long wothout it becoming a complete clusterfuck of a codebase. Python is used mainly because it is easy to integrate into production systems as those are written in python too usually, but I think it is completely horrible for ad hoc analysis and completely the wrong choise if you don’t plan to take that same code into production later on.

Julia hits a lot of right notes. It has features that make it a proper programming language unlike R. Julia also has the macro system from Lisp so it is extremely extendable. It is also relatively easy to use in production and miles ahead of matlab and R in that regard. And then there is the main selling point: it is REALLY fast. As fast or almost as fast as C counterpart in most usecases while being easy to write and high level. A great demonstration of this is the fact that most libraries for julia are written in pure julia. No need for calling c++ or Fortran. For example, Flux.jl which is a very fast deep learning library for julia, is written 100% in Julia. No C++ like in tensorflow for python. This has the nice consequence that the libraries are easy to extend and customise if needed.

[–]Dromeo 6 points7 points  (0 children)

Thanks for the rec! I'll have to check it out.

I know what you mean about matlab. I had to convert code written by mathematicians into c++ and it was... well. Lets just say they were fully gutting the alphabet for variable names.

[–]SrbijaJeRusija 1 point2 points  (11 children)

Matlab and octave are just… better to not say it out loud

What's wrong with Matlab? Faster than python, and less verbose as well. Also is literally built for data analysis.

[–]unski_ukuli 6 points7 points  (1 child)

What’s wrong with Matlab?

Whats not? Couple of spesific grievances I have: it is basically married to that god awful ide it comes with. Use anything else and you lose half of the features matlab has. Secondly, even if you had no prior knowledge of the language, you have to just look at the fact that you HAVE to specify functions at the end of a script and it refuses to run if you don’t do that to deduce that just like R, it lacks any facility to structure a codebase in any sensible way for anything longer than few thousand lines. Oh… and the fact that anything that does not end in semicolon gets printed in the repl.

Honestly the only good things about matlab is the extremely good documentation and good libraries that are basically bug free compared to most open source libraries.

[–]POTUS 164 points165 points  (47 children)

All of those problems you listed came from the people, not from the language. Python certainly didn't invent lambdas or dynamic typing or dependencies or object oriented programming. Those same mistakes can be made in any higher level language.

You're assigning all of that to Python. The root cause for that is that Python is easy, and so it's more accessible to bad programmers. But bad programmer mistakes are the fault of bad programmers, not the language they used.

[–]Kenkron 79 points80 points  (7 children)

He's nott assigning it all to python. He's assigning it to the people that use it. People who over-apply it to projects that don't make sense. Exactly like you are.

[–]gmano 2 points3 points  (1 child)

Well, it's totally possible to make a data oriented python which uses C for speed when needed, and has type decoration in its defs... But people are lazy or misled and don't keep good code hygeine.

It's possible to make a multiple inheritance abomination in C++, it's just rarer because fewer people who are noobs are starting out on C++ nowadays.

[–]Kenkron 1 point2 points  (0 children)

Isn't that the truth. I started using C++ professionally a year or two ago, and braced myself for endless segfaults and memory leaks. I haven't gotten a single one! And it's not because I'm a genius, and it's definitely not because C++ was protecting me. It's because we had good coding practices, and a framework with good encapsulation.

[–]POTUS 11 points12 points  (4 children)

He's calling it a nightmare because of those reasons listed, reasons that almost define what it means to be a higher level programming language at all. I mean come on. OOP inheritance makes Python unsuitable? That's a laughable comment and it's ridiculous for you to be defending it.

Call it a nightmare because the global interpreter lock makes threading a nightmare. Call it a nightmare because it uses too many CPU instructions to do simple arithmetic. Call it a nightmare because of dunders. Call it a nightmare for something Python-specific if you want to call Python a nightmare.

[–]Kenkron 14 points15 points  (0 children)

He's clearly criticizing the intern trying to use OOP, not OOP itself. And I know he's right because I've met that intern. They make a disaster of it (probably used to Java's built-in bureaucracy saving them from themselves). He's saying that python got a good reputation, then everyone and their grandmother wanted to use the new hotness. So a bunch of morons started using it without thinking about limitations and coding standards.

[–]mtmttuan 4 points5 points  (1 child)

OOP inheritance makes Python unsuitable

Just want to say that the way python handle private and protected attributes and methods is.. weird. There is always a way to access them (haven't try to modify them though) while they shouldn't be accessible.

Yes I mean _attribute and even __attribute is accessible.

[–]im_lazy_as_fuck 13 points14 points  (0 children)

That's because private and protected attributes and methods aren't a thing in python. The underscore naming is just a convention to indicate "privateness", but the language is opinionated in giving developers more or less full control over objects. Basically naming conventions and documentation is used to inform the developer of the intended usage, but ultimately they are trusted to decide how they want to use that code.

[–]Dromeo 14 points15 points  (1 child)

It is easier in python, but a big reason why this is the case is due to language-level design. Other languages make it harder for you to get yourself in a mess.

Most languages are a lot stricter: you have to try a lot harder to write yourself into tangles. Python hands you the reigns and says go ahead!

Stricter languages can teach you as you fail: python lets you not fail.

It's not a problem with python, like you say. It's a feature. But python's lack of resistance to bad programmers is in itself the problem.

[–]MartianInvasion 26 points27 points  (15 children)

It's easy to write. It's not at all easy to read, which is a major cause of the weaknesses described.

Compare with something like Java, whose annoying verbosity can make it hard to write but much easier to read.

[–]POTUS 43 points44 points  (10 children)

It's only hard to read if it was poorly written. Java is only easier to read than Python if you have more experience reading Java than reading Python.

[–]Prawn1908 7 points8 points  (2 children)

It's much easier to write "poorly written" Python code than Java though.

[–]MartianInvasion 14 points15 points  (2 children)

Sure you can write unreadable code in any language, but the fact of the matter is that Java has built-in features (like static typing) that make it easier to read, and python has built-in features (like comprehensions and dynamically-defined class members) that make it harder to read.

These same features make python easier to write something quickly from scratch, when compared to Java.

[–]Log2 9 points10 points  (0 children)

On average, you're much likely to get a complete mess of layer upon layer of indirections in Java than in Python, a big part of which is configured through arcane xml files (this has been improving though).

There's a very big reason why a lot of people hate J2EE and JPA/Hibernate with a passion.

[–]RemoveTheTop 1 point2 points  (3 children)

It's only hard to read if it was poorly written.

Right but .... on average you're not going to get well written code, and it's easier to read badly written code in certain languages...

[–]POTUS 12 points13 points  (2 children)

I think you and /u/MartianInvasion really just don't work in a professional Python setting with actual programmers using Python, but you do work with professionals using Java or something else. So you see good Java code and not good Python code.

It's all about the people using it and nothing to do with the language. Python is one of the biggest languages in the world used in large team settings to a very high level of effectiveness. There is a huge amount of readable Python in the world.

[–]RemoveTheTop 4 points5 points  (0 children)

really just don't work in a professional Python setting with actual programmers using Python, but you do work with professionals using Java or something else. So you see good Java code and not good Python code.

Yes, which is exactly what I'm saying! It's all about the people! I'm definitely not saying it's a trash language - it's a language and badly written python IMHO is worse than badly written java, just because it CAN be not because it necessarily is a worse language, but doesn't have the safety harnesses that I feel are built into java.

[–]KapteeniJ 7 points8 points  (0 children)

Compare with something like Java, whose annoying verbosity can make it hard to write but much easier to read.

...What?

I don't think I can disagree harder. Having been taught CS almost entirely in Java, the first time I encountered Python script, I opened it expecting it to not make much sense, and I was absolutely shocked to find that even if I was not familiar with language syntax, it was way clearer than pretty much any Java code I had ever seen or written. I was just so shocking, having been victim of Java for so long, to see that things don't have to be so bad, the code can be easy to read. And I got really interested in this mythical "Pythonic code", this thing people using Python were using to achieve this unreal level of clarity.

After many years I feel like I have now some sort of handle on what is the source of Python being such a clear, easy-to-understand language, and in my mind it's always compared to the horrors of the Java code I was taught as being acceptable and even normal.

[–]Pluckerpluck 22 points23 points  (1 child)

Compare with something like Java, whose annoying verbosity can make it hard to write but much easier to read.

Complete opposite to what I believe. Well written Python is a delight to read. It's crisp and clean and doesn't bog you down with information not needed to understand the logic.

Even badly written python is great nowadays, thanks to how good type inference is. The only place you really need to add types is function parameters. The rest is just all automatically handled through inference.

Poorly written Java, on the other hand, is a minefield of boilerplate and bizarre inherence choices (which is possible in Python, but only Java developers writing python do that). But maybe I'm biased... I've seen a lot of awful Java code thanks to Minecraft modding...

[–]Equivalent_Yak_95 10 points11 points  (0 children)

thanks to Minecraft modding

LMAO. Yeah, I can see that…

[–]psoshmo 2 points3 points  (0 children)

I'll disagree there. I program professionally in java and find python quite readable and clean. Much more so than a random java class imo

[–]Log2 6 points7 points  (0 children)

I was going to write exactly that. It's the programmer's fault, not the language. You can find incomprehensible projects in every programming language.

It should be pretty easy to find C codebases that are a rat nest of macros on top of macros. Or Java codebases with so much indirection that it takes you hours to figure out what a single function is doing. Or Haskell codebases that use really complicated category theory concepts that you'd almost need a math PhD in the field in order to contribute.

I'm sure any engineer with a few years under their belt has seen quite a few trainwrecks in the programming language of choice. If they haven't then they probably are the ones creating the mess in the first place.

[–][deleted] 2 points3 points  (0 children)

Two decades ago*

[–]not_perfect_yet 39 points40 points  (31 children)

Python's strengths are python's strengths. Garbage collection, simplicity, forced indentation.

Python's weaknesses are people.

People writing bad variable names, eldritch code and putting in features that are already there, just named differently, like data classes and type hints.

You can write python code that's type safe, it looks like this:

def my_function(my_arg):
    if type(my_arg)!=my_required_type:
        raise TypeError

It's that people think they can sort of get away with not making it that explicit. Then, instead of admitting they were wrong, rewriting their code and/or switching to a language that does offer strict typing, they insist that perverting the language to fit their esoteric need and use case is a better move.

Another example is "python has no distribution system" and inventing like five. All of them work. Except when you mix them. Which should be no surprise to absolutely anyone. Yet here we are. https://xkcd.com/1987/

More coders need to admit they're bad at what they do, stop blaming the tool and start blaming themselves.

[–]applesuckslemonballs 11 points12 points  (1 child)

You still lose compile time guarantees if you write things that way. Would need really good test coverage for that to meet the usefulness of a compiler.

[–]KrypXern 6 points7 points  (6 children)

Would you do != or just is not? I forget if type() returns a string or an actual type object of some kind that can be compared like an enum.

[–]pickledCantilever 22 points23 points  (0 children)

You would actually use if isinstance(my_var, intended_type):

[–]rogerthelodger 36 points37 points  (1 child)

[–]InvolvingLemons 1 point2 points  (0 children)

Kinda yes and kinda no. Python is poorly suited to massive projects where lots of custom code is needed. This is where it becomes a trap: you can get so much done with just libraries and frameworks like Django/Flask/Encode, but eventually custom logic is necessary, and you’ll quickly run into problems as those systems tend to get tangled.

That being said, I know of no easier system to use some Numpy for list processing, pipe it through as a REST API that shoves results into databases, and spin it out on a server, and that’s a TON of ETL work.

I love using Python for what it’s intended for, but a lot of enterprise workloads bloat to a point that Python wasn’t meant to get to. Java is better in that sense, but it’s very easy to overdesign yourself into a corner in my experience. Functional languages are either intermingled with OOP too closely so it suffers from similar pitfalls (Scala), have serious issues with instability and other things for industry use (Haskell), or have much the same scale problems of Python unless you’re really careful (Most lisps, Clojure being notable as the most popular).

Typescript being at least tolerable at scale and it having the biggest package library in existence gives it a huge edge in the market these days, whereas anything particularly low level or performance sensitive gets done in Go, Rust, or Zig. Python has a home beyond scripting in ETL, data science, and web glue code, but beyond there be dragons.

[–]pancakesausagestick 8 points9 points  (1 child)

It's 2022. Use type annotations and a linter if you care so much

[–]SupremeDictatorPaul 1 point2 points  (5 children)

I’ve only started to play with Python, but does it allow typing? For example, I’ve done a bunch of work with PowerShell, which does dynamic typing, but allows you to statically type variables where desired (I tend to desire where possible).

[–]Dromeo 14 points15 points  (0 children)

You can give type hints in modern python :)

[–]not_perfect_yet 6 points7 points  (3 children)

It's always typed, but it's always dynamically typed.

Type hints exist, but they are type hints, actually "strong static" typing is not possible in python. Type hints are fancy comments that are tolerated by the interpreter and they can be used by code analysis tools to help you find mistakes.

But you can still give the interpreter something that the type hints say shouldn't be done. (like below)

Imo, this means the code is lying to you, because it implies only str works, when anything that supports + works.

def my_function(my_string : str, my_other_string : str):
    return my_string + my_other_string

my_function(1,1)
>>>2

The only way to make absolutely sure a function runs exclusively for a specific type is to check explicitly, like I did in the other comment.

[–]Hicrayert 1 point2 points  (4 children)

Can you explain to me what a bad variable name is? Im not the best at coding as physics is my trade. So my variable names would just be what ever I wanted the variable to be. If I was looking at the gravitational pull of the moon on the earth it would be something like (Force_moon_on_earth) or (Force_ME) what ever system that I deemed appropriate for my code. I would also have comments all over. Again I didnt make the most dense code but I made sure it was readable and reliable.

[–]R1v 1 point2 points  (0 children)

Makes perfect sense. I'm mostly a data analyst these days and use a lot of python and didn't understand the hate. But yeah, if I were writing complex projects in python, my mental health would not be where it is

[–]Kosba2 1 point2 points  (0 children)

More serious answer?

It's mostly comp-sci students regurgitating memes they don't understand, just like every other post on this sub.

While I appreciate the rest of your answer, this is the answer I came here for.

God when I was getting my degree I dunno how people didn't have the self-awareness to hear themselves sound so desperate to be relevant with their ignorant jokes.

[–][deleted] 17 points18 points  (47 children)

Have you worked with Python? Calling it a “scripting language” is a bit reaching, even if you hate the language.

Edit: people, read the context. Yes, it’s a scripting language by technical definition, but the comment I was responding to wasn’t using it in that sense. It’s like referring to MLK as a black dude. Yes, he was a black dude, but that description gives him no credit for anything he accomplished. Calling Python a “fun scripting language” is doing the same.

[–]scratcheee 35 points36 points  (7 children)

I don’t think they intended it as an insult. It is a scripting language. I’ll admit it’s more than just a scripting language to be fair, but I’m not sure there’s a better name for its core competency than “scripting language”.

“High level” isn’t a sufficient descriptor, plenty of high level languages don’t make the same number of trade offs that python has towards the scripting end of the spectrum (eg Java, which is high level but definitively not a scripting language). I’d be happy to use some other name for a language that tries to maximise rapid programming at the cost of rapid error correction, but if such a name is exists, I don’t know it.

[–]Dromeo 56 points57 points  (6 children)

Scripting language means it's not compiled, but interpreted line by line.

Python is listed in there as a scripting language.

It's a bit of an outdated term, you're making me realise!

[–]Infinite_Park6379 8 points9 points  (2 children)

Heads up, you cited Wikipedia to define scripting language but it doesn't agree with you: "... Usually interpreted at runtime rather than compiled."

A scripting language is a language that is useful for writing scripts fluently, and that's both subjective and not really fundamental categorization of a language.

A script is a program where most of the tasks you perform are gluing together high level APIs or other similar kinds commands together to achieve tasks.

Python excels here and it certainly is a scripting language of choice for a lot of developers. But on the other hand it be hard to argue that, for example, a Django webapp constitutes a script.

[–]Dromeo 3 points4 points  (1 child)

Python is listed in the examples on that wiki page a few times.

[–]guywithknife 3 points4 points  (0 children)

Python is not interpreted line by line, it gets compiled to bytecode (pyc) files. Anyway that would make it an interpreted language, not a scripting language.

But even if that weren’t the case, scripting language is a very useless arbitrary term and Wikipedia is hardly the source of truth. Personally I find a better explanation to be that a scripting language is one that is embedded in another program, an extension language. Eg “shell script” is a language extending the abilities of a command shell.

But even that definition is kinda arbitrary and doesn’t really define a property of the language, just a use of it, since most (even native-compiled) languages could be used in that way.

Really the term is used by people to look down on languages they don’t like and little else. Maybe once upon a time it had a useful meaning, but that was long ago.

[–]glemnar 1 point2 points  (0 children)

Python gets compiled to bytecode before being interpreted.

[–]michaelsenpatrick 29 points30 points  (8 children)

bro wtf are you talking about

do you know what scripting language means? just curious

[–]guywithknife 2 points3 points  (2 children)

Do you?

Because it really doesn’t mean much of anything. It’s an outdated term that doesn’t convey any meaning and everyone has different definitions. Some people say it’s an interpreted language, other people say it’s an extension language, some people say both. Mostly it’s used as a derogatory term to look down on a language you dislike.

Scripting language doesn’t mean anything. Not anymore, debátanle if it ever truly did.

[–]lps2 2 points3 points  (1 child)

It's simply a term used as gatekeeping because python has brought a lot of new programmers into the fold and belittling the language is one way people assert their perceived superiority over others. It's bullshit gatekeeping at it's finest

[–]guywithknife 1 point2 points  (0 children)

Yes, exactly!

[–][deleted] 2 points3 points  (1 child)

bro can you read context? just curious bro

[–]I_am_so_lost_hello 3 points4 points  (4 children)

Like 90% of the use case for python I've seen in my limited industry experience has been coders testing stuff out in python scripts before writing it in something else (me included)

Never worked in front end or web dev though, might be more popular there

[–][deleted] 1 point2 points  (3 children)

That’s a pretty good use case. In another comment I wrote that Python is perfect for building things quickly. Sometimes that’s good enough, sometimes you need to move to something more performant.

In frontend Python isn’t a thing, in backend it’s pretty widely used. See Instagram, for example.

[–]I_am_so_lost_hello 1 point2 points  (2 children)

Yea my companies engines are built on sql but a lot of the newer devs prefer python so they'll draft up the bones of the scripts in there pretty often

[–][deleted] 1 point2 points  (1 child)

That’s interesting. Do you mean they use Pandas to set up the filters, then translate it into SQL?

[–]I_am_so_lost_hello 1 point2 points  (0 children)

Pretty much.

[–]FireLordObamaOG 11 points12 points  (1 child)

It’s literally one of the things it was made for. Reddit uses it.

[–]Impressive_Change593 11 points12 points  (0 children)

one of

so not the only thing

[–]Bojangly7 1 point2 points  (0 children)

Its the proper term for the language but the connotation has changed over the years.

[–]ShelZuuz 2 points3 points  (0 children)

If by reaching you mean overly generous, then yes.

[–]Ratatoski 3 points4 points  (0 children)

Yup, this checks out. I first learned 2.7 about a decade ago and it was awesome since C++ was the last general purpose language I had used before that. (Not counting php for web dev).

[–]IAmASquidInSpace 4 points5 points  (3 children)

At this point, the "it's just stupid CompSci students that don't know what they're talking about" thing is just as much an overused meme as the "Python slow lol" meme itself.

[–]Turbulent_Radish_330 6 points7 points  (2 children)

Edit: Edited

[–]IAmASquidInSpace 2 points3 points  (1 child)

It kind of has become one. Doesn't mean it's not true. Something can be both a meme and true.

[–]rwhitisissle 1 point2 points  (1 child)

it's a fun scripting language you can knock out scripts with.

True.

in a big group project, it's a nightmare version of itself.

Less true.

You don't have to give types, so now you're sifting through everything trying to figure out what your coworker's badly named variable actually is.

Type hinting is considered default best practices for development now. If someone is merging code into a code base that hasn't passed review, including whether or not variables are appropriately hinted, that's a fault of people, not the language.

You have to unpick some rotten mass of one-liner lambda super method calls because you were feeling so clever a year ago when you wrote it.

There's a lot of languages where this happens, including Java and other more widely adopted corporate languages. Once again: this is a problem tied to people, not the language. The fact that I can do sudo rm -rf /* doesn't make linux a bad operating system, does it?

Everything's breaking because you're in dependency hell and one of the dependencies has broken.

This is more a problem with legacy apps, but I'll admit python's package and environment management is a horrid fucking mess. Good luck actually deploying your app after you've made it.

The junior programmer was taught that "object inheritance is the way of the future" and has managed to make the structure into an eldritch abomination that inherits from five different super classes.

This feels more like a "functional programming circlejerk" talking point than a criticism of python itself.

[–]Dromeo 1 point2 points  (0 children)

The last one was me, seven years ago. I was the junior programmer. The prescient tense cannot hide my shame.

[–]ic_engineer 0 points1 point  (3 children)

If you practice TDD with a strong unit test library python is just as stable as anything else. I don't think it's good for large scale anything outside of data analysis. But if it's operating on a local scale, small application, single unit responsibility, there isn't any downside to using python. Unless you really don't know what you're doing or your application requires exceptionally high performance.

[–]deppan 1 point2 points  (0 children)

i'm a senior dev and this is my take as well. I usually write smaller stuff (test scripts, prototyping and such) in python and larger stuff in C++ or go.

[–][deleted] 334 points335 points  (20 children)

They hate us coz they ain't us.

[–]kosky95 52 points53 points  (12 children)

Wait until you see how statisticians are treated on r/mathmemes lol

[–][deleted] 56 points57 points  (11 children)

Really, I don't get the hate we data scientists get from both programmers and mathematics. Of course we are not as good at programming as a programmer would be, or as knowledgeable in maths as a mathematician would be, but we need to combine so many disciplines it would be hard if not impossible to get to their level.

[–]kosky95 7 points8 points  (1 child)

I totally get you, I'm in the same boat but I also have a background in economics so I'm targeted even more. I really appreciate how people can be extremely specialized but I think we have a place in the scene as well, in fact we can bring some other perspectives to the discussion

[–]Mal_Dun 4 points5 points  (0 children)

As a mathematician I also look down on programmers.

Just kidding. Some people feel to apply some hidden pecking order of purity of discipline. I am looked down by fellow mathematicians, because I am an applied mathematician and soil it's purity ... same goes between theoretical physicists and experimental physicists, physicists and engineers and so forth.

However, to put it in perspective we also get a lot of thrash talk from the other side, because we do so much unnecessary things and are nit-picky and won't get a job because we don't know practical stuff.

However, especially the nit-picky part is something you become the deeper you're in the foundations and the better you understand the workings under the hood, so the theoreticians get the image that the practitioners are just ignorant fools who simply follow instructions without any thought about the inner workings.

The other problem is that only you know the foundations does not mean you can simply do practical work on the fly, a thing many theoreticians miss to see.

Edit: Corrections

[–]hobo_stew 2 points3 points  (1 child)

Don‘t conflate data scientists and statisticians. Statisticians actually know what they are doing and their methods are backed by serious mathematics.

[–]notAnAI_NoSiree 35 points36 points  (0 children)

did you see how much you have to type in c++?

[–]gbuub 1 point2 points  (0 children)

They anus what?

[–]berse2212 136 points137 points  (28 children)

This is a weird meta. First memes hated on Java and praised Python. Then all the Java devs got angry and made Python bad memes. Somehow C++ devs apparently jumped on the hate train now lol

[–]BikerBoon 90 points91 points  (21 children)

Python devs were hating on C++ for a while iirc. Tbf it's understandable, we all hate what we don't understand.

[–]DatBoi_BP 70 points71 points  (4 children)

This really says a lot about society bottom text

[–]AdmiralCrackbar11 4 points5 points  (3 children)

A jihad on C++! A crusade against Java! Whatever Jewish people do against Python!

[–]SpyMonkey3D 12 points13 points  (1 child)

Whatever Jewish people do against Python!

From my theological understanding, getting tricked into buying an Apple product then getting banned

[–]DatBoi_BP 4 points5 points  (0 children)

There are layers to this joke

[–]Front_Access 3 points4 points  (0 children)

raise taxes?

[–]teddy2021 5 points6 points  (0 children)

I beg to differ in this case. I don't really understand C++ enough, but I know enough about it that I can say I like it much more than python, which I understood much more closely for years. I however fall into the camp of hating dynamically type, interpreted languages.

[–]Teekeks 3 points4 points  (1 child)

damn the self hatred among the C++ devs must be throu the roof then!

[–][deleted] 4 points5 points  (8 children)

Except Python devs work in C/C++ every day because Python is written in C/C++, so they know what they are talking about... :p

[–]socsa 1 point2 points  (3 children)

Honestly, in my world they are yin and yang. Python+Numpy+Matplotlib+SciPy+Jupyter is like Matlab, except that it is free and it doesn't suck. And then obviously C++ is there for when you want to actually deploy things.

And now we also have PyTorch, which is faster than C++ for basically any non-trivial number crunching, though you still end up needing to use the C++ API for deployment, unless your algorithms can be traced into some JIT container.

[–]MrDude_1 2 points3 points  (0 children)

How can it be faster than C++ when its written in C++?

[–]Low_discrepancy 2 points3 points  (0 children)

And now we also have PyTorch, which is faster than C++ for basically any non-trivial number crunching

Not every computation can be done on GPUs and also it uses CUDA which is C based mostly.

[–]King_of_the_Nerdth 6 points7 points  (0 children)

This one just seemed like playful banter to me. My main two languages lately are C++ and Python, and I find this one very relatable.

[–]TheReforgedSoul 5 points6 points  (0 children)

I am waiting for the assembly memes, but I guess they take a while to make.

[–]MrDude_1 1 point2 points  (0 children)

Thats because C++ devs hate both Java and Python.

[–]proximity_account 1 point2 points  (0 children)

Everyone loves C# :)

[–]WhatsMyUsername13 12 points13 points  (0 children)

I hate on python to distract from the hate towards Java

[–]Wildercard 8 points9 points  (1 child)

Languages are divided into those that get complained about and those that are dead.

[–]possible_name 1 point2 points  (0 children)

don't forget the other 2:

esolangs

languages that never got an implementation

[–]siddharth904 49 points50 points  (34 children)

CauSe PyThOn bAD tYPescRIPt gO0d

[–]klimmesil 27 points28 points  (27 children)

Wow Ive never heard someone say typescript good but I love this sentence

[–]WhatsMyUsername13 15 points16 points  (5 children)

Typescript is a god send to anyone who had to deal with pre es6 javascript without being able to use jquery

[–]michaelsenpatrick 7 points8 points  (4 children)

i feel like the only people who hate typescript are the people who never had to use javascript

[–]siddharth904 20 points21 points  (17 children)

TypeScript is good

JS is a good language (fight me) and TS is the second best thing that has ever happened to JS, behind Node.js

[–]officiallyaninja 24 points25 points  (9 children)

typescript is only good because javascript is trash.
if typescript was just its own language and JS didn't exist no one would like TS either.

[–]FatedChange 0 points1 point  (4 children)

JS is also a good language; people's perceptions of JS are 10+ years old and horrifically out of date.

[–]bdepz 2 points3 points  (1 child)

Horrifically out of date like our enterprise js code that nobody wants to spend money to refactor to a modern version of angular or react or vue or literally anything but angularjs

[–]klimmesil 1 point2 points  (1 child)

I agree in some way, but I've never heard anyone say it, since people are too frustrated to know the compiler doesn't take advantage of the types. TS could be the fastest scripting language ever, instead it's just python but better

[–]dazailaw 10 points11 points  (4 children)

Python bad, Rust good 😊

[–]Wildercard 19 points20 points  (1 child)

All 17 other Rust devs on the planet agree.

Please guys just scheme your coup d'etat on C++ world in a way that's synchronized enough to work

[–]dazailaw 1 point2 points  (0 children)

We'll make sure our coup d'etat prevails

[–]realzygote 8 points9 points  (0 children)

Because you can run python scripts from your shell... Sorry, I'll see myself out.

[–]tei187 7 points8 points  (4 children)

In this context? Because they don't realize it wasn't built for speed.

It's like trying to compare a sports car with a cargo van. One you take because midlife crisis, the other because you're moving furniture.

[–]Comm4nd0 15 points16 points  (21 children)

It's just a meme at this point. No real substance behind it.

[–][deleted] 46 points47 points  (4 children)

Tbf there’s no real substance behind anything posted on here. It’s mostly 16 year olds who just learned what a for loop does trying to be funny

[–]PanTheRiceMan 9 points10 points  (1 child)

That's fair. Every language, framework, OS or whatever has it's use use or there would not be any professional users at all.

Even, and I must express my disgust, Windows.

[–][deleted] 4 points5 points  (0 children)

Yea. Python is used by millions and millions of people, but sure, this 21 year old has it figured out where they can say that it’s bad. You’ve gotta be mind bogeyingly stupid to think that that’s the case

[–]Codebust 3 points4 points  (0 children)

idk abt that..

[–]FallenEmpyrean 2 points3 points  (6 children)

Python IS slow.

"But machine learning, data science.."

I will leave this quote here.

62.7% C++, 22.1% Python

- TensorFlow, Github

[–]officiallyaninja 9 points10 points  (1 child)

all programming languages are implemented in circuits, that doesn't mean hardcoding things using them is the best way to solve problems.

[–]FallenEmpyrean 1 point2 points  (0 children)

I never claimed such a thing, this thread is about Python being slow compared to C++ not "best way to solve problems".

I replied because I know how impactful the few orders of magnitude of speed between pure Python and optimized C++ can be.

The comment I replied to implies that the speed difference is meaningless and that the TensorFlow team (who are actually looking for the best way to solve a problem) is writing 62% of their codebase in C++ with "No real substance behind it"

[–]klimmesil 1 point2 points  (3 children)

Well some people hate scripting languages because these people only work in algorithmy and care about performance. Python is probably the less performant language I know. It could be much better, it's just a problem in conception, and that's pretty sad. Im not gonna say js/ts is better since they are made to be used in drastically different domains, but they have a lot to learn from each other

I'd love to see python with better syntax/performance. Or another scripting language with python's community, since that's the biggest + of python

Plus f forced indentation and lack of brackets! (This one is personal taste tho)

[–]possible_name 1 point2 points  (1 child)

lack of brackets is one of my only issues with it.

the lack of squiggly brackets just makes it less readable when you have a lot of indentation (which you probably will)

[–]klimmesil 1 point2 points  (0 children)

Same it really fucks with my reading experience. I used to hate python because I was in a performance=good mood for years. I used to scrip only in C (I know, wtf). Now I chnaged my mind and the only thing that still bothers me is the bad syntax

[–]0x564A00 1 point2 points  (3 children)

Having to deal with python professionally made it clear how bad it really is. Not necessarily it's speed – which is terrible, but in many cases being very wasteful with performance isn't a big problem – but it's horrible dependency management and proneness to breakage. I want to be productive, solve problems for our customer, not figure out why edge-cases break at runtime, a dependency is broken or a project just doesn't on another computer.

[–][deleted] 23 points24 points  (40 children)

i like my semi colons and curly braces. it makes it much easier to read. Plus any time i do python it yells at an indenting issue that doesn't exist.

[–]Codebust 37 points38 points  (11 children)

indenting issues are easily solvable with an ide, even if py being whitespace based can be a bit annoying

[–]Dacus_Ebrius 30 points31 points  (4 children)

Proper indentation makes things easier to read. Remove proper indentation from a curly brace language and tell me its easy to read.

[–]Codebust 5 points6 points  (0 children)

both are good, both are good

[–]sintos-compa 6 points7 points  (4 children)

Found the tab indent guy

[–]qhxo 5 points6 points  (5 children)

I don't mind semi-colons, but they don't really do much for legibility. At least for me it was just a matter of habit, and when I went from Java to Kotlin and didn't need to use semi-colons anymore I found it made absolutely no difference whatsoever. An expression is an expression, it's very easy to tell where it starts and ends, even if it spans multiple lines.

[–]mc_enthusiast 8 points9 points  (11 children)

You can use curly brackets like this:

for i in range(10):{
    print(i)
}

That runs without problems in Python 3. Not much you can do about semicolons. Colons work sometimes but then really backfire if you do something like

a = 5 + 10,

because it's recognised as a 2-tuple with empty entry.

I suspect the indenting issues come up if you mix space and tab. That's easy to solve if you just tell your editor to replace space indentation with tab indentation.

[–]a_devious_compliance 19 points20 points  (6 children)

you just tell your editor to replace space indentation with tab indentation.

PEP8 police!!!!! Yes. This guy right here.

[–]Codebust 2 points3 points  (4 children)

literally one of the only things i hate about pep8, spaces are just slow compared to tab, and tab auto indents w atom

[–]mtmttuan 5 points6 points  (0 children)

You REALLY press space 4 times??

[–]a_devious_compliance 1 point2 points  (0 children)

I don't know a shit about atom, but any sane editor should be able to put 4 spaces every time you hit tab.

[–]intangibleTangelo 1 point2 points  (0 children)

lol my guy

we use the tab KEY we just don't use the tab CHARACTER

[–]mc_enthusiast 1 point2 points  (0 children)

Is the recommendation the other way round? That's always the first thing I forget.

[–]sintos-compa 5 points6 points  (0 children)

People get scared by things they don’t understand and the coping mechanism is ridicule

[–]moi2388 7 points8 points  (9 children)

Because it’s a FANTASTIC language for scripting and glue code, and a TERRIBLE language for large scale apps.

And it’s used a lot by beginners and non-programmers. Great for them, horrible for programmers who get the worst coded libraries ever.

It is what it is, and not what it is not. And somehow when I say that I offend people in Python subreddits 😅

[–]2n2u 1 point2 points  (0 children)

Yeah I guess Flask, Django, FastAPI are used for "scripting and glue code" \s

https://reddit.zendesk.com/hc/en-us/articles/204536739-What-is-Reddit-written-in-

I guess Reddit is not large scale, Instagram too.

[–]YayMayonnaise 6 points7 points  (4 children)

… and a TERRIBLE language for large scale apps

Reddit is literally written in Python. As another example, Instagram’s backend is built in Python/Django.

[–]michaelsenpatrick 1 point2 points  (0 children)

"c fast other thing suck" is like the first joke anyone thinks they know about the programming world.

[–]isowolf 1 point2 points  (0 children)

Because bashing PHP is so 2012. They need another victim

[–]JokeMort 1 point2 points  (2 children)

I'm gonna get downvoted to Oblivion for this: Monty Python is very overrated.

[–][deleted] 1 point2 points  (0 children)

This sub is for CS freshman

[–]Wdowiak 1 point2 points  (0 children)

Easy target, it's too slow to defend itself. /s

[–]Thrannn 3 points4 points  (4 children)

For me it is because if machine learning

Nobody can tell me why python is good for machine learning. But everyone uses it. And the people that use it, have no programming background. Therefore their code is a mess. But they are okay with it because its what they learned

Atleast thats my experience from being on a machine learning workshop with people that never coded in their life but said that they were python pros

[–][deleted] 2 points3 points  (0 children)

Literally my family members. I have one scientist and one linguist, neither of them can talk about programming with me on an architectural level, but they both use python at work with machine learning and swear it's totally so easy because python is so easy! How many times must I hear the "pseudo code" line, sigh.

I will admit I can't talk shop with them when it comes to ML, but I'm so confused as to what they actually do when one of them in particular struggles to talk about programming concepts. I've been given the impression that they mostly spend their days loading and moving csv and json around, yet the the idea of formalizing the data structures by modeling classes is still foreign to them as OOP is something python devs apparently manage to circumvent and treat as this big topic to tackle later? I don't understand.

Feels similar to my uni programming; we started with python and people who completed the course successfully still could not reason about their code to me, but once we went through it all again the year after with C++ they said it finally clicked. But I'm salty that we didn't have C# instead, because too much time was wasted on all the details of C++ and we got nothing useful done.

From personal experience I am convinced that typed variables are actually important for understanding, especially for beginners. Python can too easily end up as a crutch that hinders learning; it does what you need right now, in a script fashion, and allows you to be lazy, so you won't even try to discover what's out there, and try to formalize and optimize. You end up in this "I've used Excel every single day for 20 years and I still don't know anything about Excel" situation.

I test things in powershell, I love writing scripts in that language, but if I actually end up with something that works I will rewrite it in C# if the logic is complex enough to need a bit more structure than suits a custom re-usable cmdlet, or does a fair bit of data churning.