Python is by far the fastest to write, cleanest, more maintainable programming language I know
Maintainable? I have not ever had to work with any large Python projects, but from what I have heard, maintenance is a large pain point.
Welcome to the Python community on the programming.dev Lemmy instance!
Past
November 2023
October 2023
July 2023
August 2023
September 2023
Python is by far the fastest to write, cleanest, more maintainable programming language I know
Maintainable? I have not ever had to work with any large Python projects, but from what I have heard, maintenance is a large pain point.
My small Python (~100 lines of codes) codes aren't maintainable, but I'm happy with them. I don't ever plan to work on serious projects with Python, so I can't say much about it's maintainability. But, from limited experience, I'd rather use C++, C#, or in my special case, G'MIC if maintainability matters to me.
There's one key qualifier in this sentence: I know. One's skill set matters, I guess...
Let me guess: The author knows Python, C, C++, Java and maybe PHP.
It's not too bad if you strictly enforce Pyright, Pylint and Black.
But I have yet to work with Python code other than my own that does that. So in practice you are right.
My work uses python and it hasn't been bad for new code that has tests and types. Old code we inherited from contractors and "yolo startup" types is less good, but we've generally be improving that as we touch it.
i had the misfortune once of having to try to understand a >400kLoC python codebase in a critical position and let me tell you that maintainability is a Problem. the system was older than most of the best practices of today and had a structure i can only describe as "a duolith of sqlalchemy soup".
Python has typing hints which mypy uses. It's similar to something javascripts wants to introduce call type annotations. It also has linters and formatters (ruff which does the work of multiple tools in one and is very fast). It also has unit tests built in as well as popular test libraries like pytest and nox and tox for running tests.
It is up to the maintainers to use the tools they have been given to make projects maintainable. I have worked on and seen very maintainable python projects of various sizes. While legacy code is always a bit of a nightmare (python 2 and < python 3.6), it doesn't have to be that way and getting into a python project nowadays is way easier than most other languages I've tried (maybe also because it's what I know well).
For normal stuff, yes. For things that are implemented in C and just interfaced with in Python, so the majority of data analyis and ML libraries, no.
In my experience, it is.
I had converted a Python code into G'MIC, and then some one else did a Python version of my own code. G'MIC is interpretative with JIT math parser. The results:
Reversing digits in a 1024x1024 RGB image.
Python: Without lookup table and numpy - 3+ minutes
Python: With lookup table and numpy - 6.5 s (Some one else machine, but it shouldn't take that long)
G'MIC: Without lookup table - .3 s
G'MIC: With lookup table - .005 s
And I did Lavander Binary Map on my machine, you can find code for Python version in github/gmic-community/include/reptorian.gmic:
Python: 3 s (Without lookup table)
G'MIC:.15 s (Without lookup table)
G'MIC: .05 s (With lookup table)
Honestly, I find Python pretty bad for image processing in general.
Oh man, it's only from reading this that I've realised that 'pypy' isn't the same as 'pypi'