Announcement

Collapse
No announcement yet.

Python 3.12 Alpha 4 Released For Testing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Python 3.12 Alpha 4 Released For Testing

    Phoronix: Python 3.12 Alpha 4 Released For Testing

    While many haven't even moved yet to the very speedy Python 3.11 that was released back in October, for those wanting to do some bleeding-edge testing the fourth alpha of Python 3.12 is already out...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    I think Python is a great language to someone who wants to learn programming, and a great language for tinkerers, scientists, mathematicians, biologists, chemists, statisticians, engineers, and other people who are not developers. I think Python is a terrible language for developers.

    It is great because it is so simple and non-developers can just focus on what they want to do, and its easy to learn, because it is simple and it doesn't have advanced stuff in it. You import some module, write your functions and call it. Simple and easy!

    But for developers Python sucks.
    • Documentation - Unlike other languages such as Rust which standardized comments on Markdown, or C# which standardized on XML documentation, or Java which standardized on Javadoc, the situation in Python is worse, there is no real standard for documentation. Some use Markdown, some use reStructuredText, others use something else. Even internally Python itself is very inconsistent in its documentation.
    • Example code - Without types it is difficult to follow what is happening, or what you can expect or how a function is used. You have no idea what a function or algorithm expects or returns without type hints.
    • Type hints - Type hints are great in other languages such as TypeScript, but in Python they are difficult to write because you have to use List or Sequence or other stuff depending if its input or return type, and you have to use Map or something else, it is very awkward. Up until recently doing union types was very awkward, but it is better now. Type hints are so shitty, awkward and immature that they have not been embraced by the Python community. Even Python itself is not properly type hinted.
    • Weird operators - Python has weird confusing stuff like the Walrus operator := which not used by any other language. So nobody is familiar with it, its and extra thing to learn and people get confused and don't know what it is.
    • Properties - Python has this weird, awkward, way to write properties that require lots of boilerplate code and the use of decorators. Compare this to other languages like C# where it is dead simple, or even TypeScript.
    • Class variables and instance variables - Are confusing, it is not obvious if it is a class variable or a instance variable, there is no syntactic difference, you have to check if its assigned using self or not. This gets even more confusing with @dataclass that changes this behavior.
    • Self - You have to pass self as argument to every method in a class.
    Python tricks you that it is a simple language, because it doesn't have interfaces, abstract classes, properties, etc. The truth is, it doesn't have native first-class support for these stuff in the syntax of the language itself, but you can still do these things with the Abstract Base Classes (ABC) module that provides decorators, the @property decorator, etc, so when you do it it gets all awkward because you use things that shoehorned on instead of natively supported.

    Comment


    • #3
      They could simply support both forms of imports. What a shitty language.

      Comment


      • #4
        TypeScript is bullshit forced by Microsoft to kill Java, Rust is bullshit invented by mozilla instead of producing next-generation web browser (and I support Mozilla since its begining). Python just works, allows to program efficiently and fast. If you need performance use assembler, C, C++, otherwise Python is perfect. Not counting python's ecosystem.

        Comment


        • #5
          Python is the best for developers! uid313, you have dynamic typing phobia and "class OOP" in mind.

          Comment


          • #6
            Originally posted by stalkerg View Post
            Python is the best for developers!
            thanks but no, thanks.

            In my career I've seen too many time Perl and Python script silently corrupting data for years before anyone noticed, because the scripts never cared to check if an input value was actually a double or a string or whatever.

            And it happens all the times.

            I've seen failing perl script rewritten in python and failing again for the same exact reason, and everytime this happened, the cost to fix the situation was much higher than the cost it would have had to develop the software with a proper programming language at the beginning.

            I prefer having a compiler complaining all the time when I do dumb things and spend 2x the time to write software than having to fix the mess later for a too permissive language.









            Comment


            • #7
              Originally posted by cynic View Post

              thanks but no, thanks.

              In my career I've seen too many time Perl and Python script silently corrupting data for years before anyone noticed, because the scripts never cared to check if an input value was actually a double or a string or whatever.

              And it happens all the times.

              I've seen failing perl script rewritten in python and failing again for the same exact reason, and everytime this happened, the cost to fix the situation was much higher than the cost it would have had to develop the software with a proper programming language at the beginning.

              I prefer having a compiler complaining all the time when I do dumb things and spend 2x the time to write software than having to fix the mess later for a too permissive language.








              You can't blame the language for crappy untested code. Bad code is bad in any language. Your silent data corruption wasn't python's fault, it was the developers fault for not writing tests to ensure no bugs creep into the system. All production code should be fully tested. Production Python code MUST have even more comprehensive tests if you aren't using mypy as it isn't type safe.

              Comment


              • #8
                Originally posted by partcyborg View Post

                You can't blame the language for crappy untested code. Bad code is bad in any language. Your silent data corruption wasn't python's fault, it was the developers fault for not writing tests to ensure no bugs creep into the system. All production code should be fully tested. Production Python code MUST have even more comprehensive tests if you aren't using mypy as it isn't type safe.
                when the selling point of a language is "fast and easy to write" it implies that:

                1. the developer doesn't have to be too qualified;
                2. you are in a hurry;

                so, you won't write tests in either case,

                if your plan is to write fully tested code (as it should always be) then you don't have to program in Python, and Python won't be an useful tool for you.

                Also, programming languages are tools: unsafe tools have higher risks. If you deliberately choose them, after evaluating the risks, then it'is fine. If you choose them because "everybody programs in python" or "because it's easy and fast to write" then you're looking for troubles.

                Comment


                • #9
                  Whoa, lots of Python extremism here!

                  My take is that its a fabulous orchestration language for stuff like Blender, PyTorch, VapourSynth, and so on. But it is a shame when the orchestration grows into an architecture, which is when the runtime starts eating CPU and deeper bugs make you wish the project was strictly typed.
                  Last edited by brucethemoose; 12 January 2023, 05:20 AM.

                  Comment


                  • #10
                    Originally posted by brucethemoose View Post
                    Whoa, lots of Python extremism here!

                    My take is that its a fabulous orchestration language for stuff like Blender, PyTorch, VapourSynth, and so on. But it is a shame when the orchestration grows into an architecture, which is when the runtime starts eating CPU and deeper bugs make you wish the project was strictly typed.
                    I'm not an extremist, on the contrary I like using different languages for different tasks.
                    What I don't like is the Python/JS market polarization pretending that those two languages are fit for whatever task you have to do.

                    In my company now we are in a "let's rewrite everything to python" phase and since we process sensitive data I see this as an announced disaster.

                    I appreciate python for data analysis, but rewrite the entire backend with this language is completely insane.

                    Comment

                    Working...
                    X