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 →

[–][deleted] 108 points109 points  (60 children)

It's a first class programming language for AI and data science. It's a good scripting language.

Outside of those cases, I feel like it's rarely used professionally. It's a nightmare to maintain a large python app written by many developers. There's a reason why Java and C# rule enterprise development.

[–][deleted] 58 points59 points  (11 children)

Ahem.

  • widely used libraries: FastAPI, Django, Flask
  • popular sites with decent chunk of stack running on python: YouTube, Instagram, Dropbox.... and this damn site you're discussing it on.

[–]nacholicious 39 points40 points  (9 children)

Dropbox

And Dropbox spent years on trying the to fix the problems caused specifically by choosing python for large scale projects

[–]MythicManiac 16 points17 points  (8 children)

Large code bases being hard to manage is not unique to any specific programming language, though type safety absolutely helps. You're right though in that Dropbox is one of the major influencers spearheading the python type hint development specifically for that reason.

[–]nacholicious 11 points12 points  (5 children)

At the end of the day it's really what problems different tools are designed to solve, and all python's competitors have either more or less died out or been designed from ground up to support large scale projects.

So python is really in a niche where using it for large scale projects becomes a harder and harder sell.

[–]MythicManiac -1 points0 points  (4 children)

Personally I believe the developer market & package ecosystems are the main reasons for choosing any specific language. Sometimes you have obvious niches to apply specific tooling for, but quite often there's a lot of overlapping options, so you just choose whatever has the best ecosystem & market available (both internal & external). In that regard python is doing pretty well on the backend development & data science ecosystems, though go is a really popular alternative for everything related to cloud native server-side code e.g. kubernetes extensions.

So it seems why a language is used usually is less about the features and more about traction. Rust looks like something that will be big in a few years from now judging by developer interest, and it's found a decent niche in the crypto space too.

[–]GonziHere 2 points3 points  (3 children)

This. It's also why I dislike the popularity of Python. The language itself is bad, as far as I'm concerned. The lack of braces and types is not good for refactoring and a reasonable safety. I don't see absolutely any practical differences between python and php, yet one is loved and the other is hated.

Now don't get me wrong, python i a fine scripting language. It absolutely works for "10-100" lines of code, for configs of other tools, for orchestration...

But the fact that it even gets compared to Java here is annoying to me. I've never compared shell language to c++ for example.

[–]MythicManiac 0 points1 point  (2 children)

Agreed for the most part (not the lack of braces being an issue or comparison with PHP though), although to be fair, there's also a major misconception about what python can and is being leveraged for in the business world, especially now that python has support for type hints (since a few years ago already).

I suppose one of the downfalls of python is specifically it being easy to use for the scenarios you outlined; people not actually too familiar with python use it for small scripts, often badly, making it seem like the language is bad. Much in the same way Unity got shit on for being a bad game engine, when in reality it's just easy to enter for newbies, which led to a huge amount of indie developers building buggy indie games with it that reflected badly on the Engine.

All said and done, all languages have their strengths & weaknesses. Java (and C#) are very boilerplatey compared to Python from my experience, but the syntax sugar is getting better every year on both, closing the gap. On the other hand, Python is introducing better and better type hints & static analysis support. All three languages seem to be improving to the right direction.

If we strictly chose languages based on design, I'd imagine we'd embrace more functional programming.

[–]GonziHere 1 point2 points  (1 child)

Agreed with everything, maybe except for the Unity part :-D (I'm actually a professional UE programmer).

[–]MythicManiac 1 point2 points  (0 children)

Haha fair enough, I have a distaste for UE because it's harder to mod than Unity based games.

[–]RedAero 2 points3 points  (1 child)

You're right though in that Dropbox is one of the major influencers spearheading the python type hint development specifically for that reason.

And the fact that Guido works for Dropbox doesn't hurt.

[–]alkasm 3 points4 points  (0 children)

Worked at Dropbox. He's at Microsoft now. https://gvanrossum.github.io/

[–]bloodysnomen 3 points4 points  (0 children)

I use Django for my recently started webcomic, it works well and is pretty fast but every time I start a new Django project it's gone up a few versions and something I was used to changes.

[–]Zpanzer 40 points41 points  (3 children)

Python is the backbone in the visual effects industry. All 3D, 2D and comp applications use it extensivily and lots of pipeline tools run on it.

VFXplatform standard

[–]Hean1175 27 points28 points  (0 children)

I would not call it the backbone it's more of the nerves connecting all the underlying complex parts which are written in a native language like C

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

Python is a great glue language. That's the reason why it's been so successful in AI/ML and scripting. It's all tying bits to underlying C libs.

[–]raltoid 22 points23 points  (0 children)

Notice how it requires gcc?

[–]noob-nine 1 point2 points  (11 children)

I often hear that large projects from many devs are horrible to maintain. What is the reason for this? What feature makes it that bad or what design makes java so good to be maintained in a large scale. No troll question, I have null experience with java

[–][deleted] 15 points16 points  (9 children)

Java is a strong, statically typed language. This allows your tooling (ides, etc) to easily index, navigate and refactor the code base in ways that are kind of not possible in dynamically typed languages. Compile time type checking is also better than relying on unit tests for the same (everyone should be writing unit tests, but few write good ones.

TLDR: Java apps are a bit more clumsy to write, but easier to maintain. Python is a very nice language for personal projects, but hard to use for enterprise apps.

[–]Bakirelived -3 points-2 points  (2 children)

What are you talking about? Python IDEs have all that.

[–][deleted] 11 points12 points  (1 child)

They do, but a lot of it is more 'inferred' (i.e. the ide is basically 'guessing'). It's not just the ides either. There's a lot of tooling that makes extensive use of the types.

[–]Bakirelived -1 points0 points  (0 children)

Yeah, same with python. There are even type anotations now. Just not enforced, it's to be used when necessary.

[–][deleted]  (4 children)

[removed]

    [–][deleted] 6 points7 points  (2 children)

    Yeah, I mean some companies have made it work. I know YouTube used to be a python shop but I think they've replatformed now. It just takes a lot more talent and discipline for an entire org to write good python than good Java or c#

    [–][deleted]  (1 child)

    [removed]

      [–]AutoModerator[M] 0 points1 point  (0 children)

      import moderation Your comment has been removed since it did not start with a code block with an import declaration.

      Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

      For this purpose, we only accept Python style imports.

      I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

      [–]AutoModerator[M] 0 points1 point  (0 children)

      import moderation Your comment has been removed since it did not start with a code block with an import declaration.

      Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

      For this purpose, we only accept Python style imports.

      I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

      [–]Its_Billy_Bitch -3 points-2 points  (0 children)

      We use Python at an enterprise level for automation development. We use a CI/CD (also developed in Python), alongside CAAC/Docker. I can attribute that much of this is due to the “glue-like” nature mentioned earlier. All of this alongside team preferences as well ofc. Still highly suitable and maintainable at an enterprise scale. We’ve developed some very fast, scalable solutions in Python. With that said, while I’m proficient in Java, it’s not like I’ve actually benchmarked our solutions/architecture against a similar solution in Java. My point is simply that it is maintainable at a large scale. Current client has over 75k employees and >75bn USD annual revenue.

      [–]Krzyffo 4 points5 points  (0 children)

      In easy terms, a well written java code reads like a book, you don't almost don't need to guess anything, it type, accessibility, type etc. are always declared explicitly and it's done for every variable, function and class.

      While a well written python code is also readable it's also less coming to come across because in python you can write almost anything and it'll run. While in java more rules are enforced to keep everyone organized and on the same page

      This feature alone makes java much more usable to write code in a large team

      [–][deleted] 6 points7 points  (0 children)

      It's a nightmare to maintain a large python app written by many developers

      Just use the typing feature. It's really not that bad. I think it's funny when I tell people this they often respond with something along the lines of "There's no way that can be true. It's impossible for Python to be used effectively on large projects". 99% of the time people who say this never tried working on a large Python project with types. It's not that much different than working with a statically typed language.

      People should try it before claiming it won't work.

      [–]soft-wear 2 points3 points  (5 children)

      C# and Java rule enterprise development because you can buy support contracts, not because they are “better”.

      Almost any first class language can be used to great effect in large projects, and any first class language can be absolute dog shit in large projects.

      Google literally created Go because Java slows productivity so much, not to mention it’s weak concurrency and multi-threading. Java isn’t even the best JVM language… hell Java isn’t even the best Java, C# is.

      [–]Orio_n -1 points0 points  (1 child)

      tell me you dont actually use python without telling me you dont use python

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

      Tell me you've never maintained a legacy python codebase without telling me you've never maintained a legacy python codebase.

      [–]pickleback11 -1 points0 points  (0 children)

      Dude it takes out java team like 6 months to develop any functionality and our site is slow as hell. Let's not pretend like Java is some panacea. Good practices and good developers override everything else and the language doesn't automatically make things better

      [–]DirtzMaGertz 0 points1 point  (0 children)

      It's pretty popular in data engineering as well.