Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Is Python slowly losing its charm?

Is Python slowly losing its charm?

Scheduled Pinned Locked Moved The Lounge
pythoncomquestion
48 Posts 33 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R raddevus

    Why I Start Python then always Stop I like a lot of programming languages. C# is my favorite, but I like C++, Pascal, C, Java, Kotlin (more & more all the time), even Swift (very Kotlin-like), TypeScript and I also like JavaScript -- even though it has a lot of annoying things like === etc. I try to like Python, I really do. But there are a number of reasons that every time I start using it again I stop. 3) whitespace dependent. I've hurt myself with this where code fails due to having a tab where I should have 3 spaces or vice-versa. It's annoying. Just use some friggin' brackets. 2) global variables in file. If you define a variable in a file it is global to every function in that file. What!?! Yep. It's painful and confusing and a bad idea. 1) But the number one, knock-down, all-time biggest reason I just can't get past it is the use of double-underscores. X| Yes, I'm a syntax snob. :-\ It's just the ugliest syntax ever and I don't want to type underscores all the time! It's so ugly to look at Python code. Here's a sample from official documentation:

    class Mapping:
    def __init__(self, iterable):
    self.items_list = []
    self.__update(iterable)

    def update(self, iterable):
        for item in iterable:
            self.items\_list.append(item)
    
    \_\_update = update   # private copy of original update() method
    

    It's so ugly, so I just stop Python as soon as possible and go back to one of the good languages. I was also wondering why Van Rossum (creator of Python) used underscores so much and there are some good explanations in this post. But there is no excuse, because other modern languages have not had to use characters like that. Why does python use two underscores for certain things? - Stack Overflow[^]

    P Offline
    P Offline
    Peter R Fletcher
    wrote on last edited by
    #33

    On global variables in Python: it is misleading to say, without qualification: "If you define a variable in a file it is global to every function in that file." It is true that if you define and/or use a variable outside a function, it becomes globally visible to 'subsequent' code within the file. It is, however, treated as read-only outside its original scope unless it is specifically declared as global within a function definition. I can see that even the read-only visibility of such variables may be offensive to those to whom the thought of global variables is anathema, but I do not find it so.

    P 1 Reply Last reply
    0
    • G glennPattonWork3

      I'm not the only one to think 'Talking Heads' then...

      C Offline
      C Offline
      Carl_Sharman
      wrote on last edited by
      #34

      I'm glad I'm not alone in that :)

      1 Reply Last reply
      0
      • P Peter Adam

        No, it is worse. It's syntax is C infested.

        K Offline
        K Offline
        Kirk 10389821
        wrote on last edited by
        #35

        I resent that... I love the C syntax. I might be biased because I learned Macro-11 Assembly before C, and there is a one to one mapping on most C statements.

        P 1 Reply Last reply
        0
        • C CPallini

          In my opinion Python is not a toy language (and even BASIC wasn't). That said, Python is far better than BASIC (and Lua is even better than Pyhton). Scripting languages have their usage.

          "In testa che avete, Signor di Ceprano?" -- Rigoletto

          K Offline
          K Offline
          Kirk 10389821
          wrote on last edited by
          #36

          to get a fixed block read of block X. You declared the block size when you opened the file. We used this for lightning fast Hash Lookups. Extensible? We had to modify the OS to add "sys" calls to a jump table. But we could do it. Now, BASIC allowed DLL calling in windows. And Python allows wrappers of compiled code. Finally, to me the MOST POWERFUL piece of an interpreted language is the ability to EMBED it as a scripting language inside of an Application to let the end users extend it. I wrote applications inside of Word and Excel for people. It broke my heart when I went to embed VBA inside of my application, and ran into MSFT Licensing (OMG Draconian). So we used a different scripting engine that was free and based on Pascal. It worked... But I would have loved for the product to have the Power and Libraries of Python!

          1 Reply Last reply
          0
          • S swampwiz

            https://towardsdatascience.com/python-is-slowly-losing-its-charm-9ca652726492[^] my opinion: To me, it's always seemed like a toy language like BASIC.

            N Offline
            N Offline
            NightPen
            wrote on last edited by
            #37

            Unity used to have boo a python scripting language. No one used it though as Unity also had C#. Me personally I prefer C#.

            K 1 Reply Last reply
            0
            • K Kirk 10389821

              I resent that... I love the C syntax. I might be biased because I learned Macro-11 Assembly before C, and there is a one to one mapping on most C statements.

              P Offline
              P Offline
              Peter Adam
              wrote on last edited by
              #38

              They come out of Math class where = means equality, go to the next class, in gentle Python = means let be equal...

              1 Reply Last reply
              0
              • P Peter R Fletcher

                On global variables in Python: it is misleading to say, without qualification: "If you define a variable in a file it is global to every function in that file." It is true that if you define and/or use a variable outside a function, it becomes globally visible to 'subsequent' code within the file. It is, however, treated as read-only outside its original scope unless it is specifically declared as global within a function definition. I can see that even the read-only visibility of such variables may be offensive to those to whom the thought of global variables is anathema, but I do not find it so.

                P Offline
                P Offline
                Peter Adam
                wrote on last edited by
                #39

                So, in short, it is the Python way of the singleton pattern?

                1 Reply Last reply
                0
                • N NightPen

                  Unity used to have boo a python scripting language. No one used it though as Unity also had C#. Me personally I prefer C#.

                  K Offline
                  K Offline
                  Kolya Ivankov
                  wrote on last edited by
                  #40

                  Blender uses python to script its objects. But I for now use Godot since they've included a whole C# support.

                  1 Reply Last reply
                  0
                  • T tronderen

                    CPallini wrote:

                    Scripting languages have their usage.

                    Let us limit them to that. The thing is that lots of people live with the misconception that Python is suitable for general problem solving, of arbitrarily complex problems. Scripting languages are meant for scripts, for managing a process (such as the building of a software system). It startet with Job Control Languages, developed into Unix sh and all its derivatives, or .bat files developed into PowerShell. You may see scripting languages such as Python as a further developments of shell concepts. You would never try to solve a complex problem as neither a bash nor PowerShell script. Even with further development of those concepts into Python (and its functional relatives), scripting languages are not suitable for complex problem solving.

                    U Offline
                    U Offline
                    User 9154661
                    wrote on last edited by
                    #41

                    > Python (and its functional relatives), scripting languages are not suitable for complex problem solving. what a ridiculous remark python is used all the time for statistics and machine learning of course it can be used for general problem solving and it can be used for much more that just scripts Blender uses python Django and Flask are python frameworks for web development just read how netflix uses python https://netflixtechblog.com/python-at-netflix-bba45dae649e and they aren't the only big company using python for more than just scripting

                    1 Reply Last reply
                    0
                    • 5 5teveH

                      There are so many 'articles' these days predicting the rise/fall of pretty much anything. Most are just 'click bait' and I think this is one of them. I don't use Python, (and I'm not a big fan), but I seriously doubt that it's in decline.

                      K Offline
                      K Offline
                      Kolya Ivankov
                      wrote on last edited by
                      #42

                      The article doesn't predict Python's downfall either. Just being a bit critical about unhindered further proliferation as prophesied by python fans.

                      1 Reply Last reply
                      0
                      • S swampwiz

                        https://towardsdatascience.com/python-is-slowly-losing-its-charm-9ca652726492[^] my opinion: To me, it's always seemed like a toy language like BASIC.

                        B Offline
                        B Offline
                        Bitbeisser
                        wrote on last edited by
                        #43

                        BASIC in most cases was rather useful...

                        1 Reply Last reply
                        0
                        • OriginalGriffO OriginalGriff

                          I didn't know it ever had any charm. Significant indentation? And tabs / spaces are not equivalent? So you can have two identical looking lines of code but they compile differently? There is no charm here, just confusion and stupidity. X|

                          "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt AntiTwitter: @DalekDave is now a follower!

                          D Offline
                          D Offline
                          Daniel Wilianto
                          wrote on last edited by
                          #44

                          Yeah, ending a code block by reducing the indentation one step is a really horrible nightmare and prone to errors, especially when you press ENTER around in your text editor. I would stick to languages that use curly braces.

                          1 Reply Last reply
                          0
                          • S swampwiz

                            https://towardsdatascience.com/python-is-slowly-losing-its-charm-9ca652726492[^] my opinion: To me, it's always seemed like a toy language like BASIC.

                            S Offline
                            S Offline
                            SergeiV
                            wrote on last edited by
                            #45

                            It is somewhat "C-like" but doesn't contain interoperabilty means (even like #define preprocessor). One cannot reuse his code! Python is a nice toy. Not much more. I'd better say "Python rapidly moves to its place in a language ranking list".

                            1 Reply Last reply
                            0
                            • S swampwiz

                              https://towardsdatascience.com/python-is-slowly-losing-its-charm-9ca652726492[^] my opinion: To me, it's always seemed like a toy language like BASIC.

                              L Offline
                              L Offline
                              lognormal
                              wrote on last edited by
                              #46

                              Many of the opinions expressed here take a rather narrow view of Python. As one person said, it's like a formatted scripting language. True: but that is a front end for a formidable power-house of resources. It's also a far more accessible scripting language than Perl. I use Python to develop large programs that run AI and Fluid-dynamic simulations. My usual language for that was C/C++, but for me Python opens up the door to accessing massively parallel computing through CUDA and PYTorch. This I can do, in an object-oriented way, without fussing around having to learn CUDA (the modern equivalent of assembler code?). I can easily run 2D hydro simulations on my nVidia card, I can run complex Neural Net programs and, best of all perhaps, I can develop beautiful visualisations. There are several things to regret about design choices in the language. In particular the use of text formatting (indents!) to delineate stretches of code rather than parentheses - that's crazy but I live with it. Upgrades come thick and fast: that's good of course, but does cause problems with backwards compatibility (as in the recent upgrade to Python 3.8). But it's all free - the work of people dedicated to providing a fantastic programming environment. Now programming is fun - maximally creative. Many thanks to all those people.

                              Why make life more difficult than it is?

                              1 Reply Last reply
                              0
                              • S Slacker007

                                I don't think Python is losing its charm as much as people are realizing that programming is not for them. This goes back to a post I made a few days ago, where I said that the world is throwing technology at everyone, hoping many become programmers, engineers, etc. Python was supposed to be the language for the masses. Only problem is, the masses don't like programming.

                                S Offline
                                S Offline
                                ScottTheFortranHacker
                                wrote on last edited by
                                #47

                                For those who realize that "programming is not for them," their time is spent learning how to run programs that others have created.

                                1 Reply Last reply
                                0
                                • S swampwiz

                                  https://towardsdatascience.com/python-is-slowly-losing-its-charm-9ca652726492[^] my opinion: To me, it's always seemed like a toy language like BASIC.

                                  B Offline
                                  B Offline
                                  BotReject
                                  wrote on last edited by
                                  #48

                                  I never really got into Python, everytime I try something about it bores me. It seems to me that it would be good for processing lists which is possibly partly why it's so popular in AI: using numerical methods to update all those nodes seems well suited to Python (though I still prefer Java for this personally). Perhaps it just needs more jazzy tutorials to make it appealing.

                                  1 Reply Last reply
                                  0
                                  Reply
                                  • Reply as topic
                                  Log in to reply
                                  • Oldest to Newest
                                  • Newest to Oldest
                                  • Most Votes


                                  • Login

                                  • Don't have an account? Register

                                  • Login or register to search.
                                  • First post
                                    Last post
                                  0
                                  • Categories
                                  • Recent
                                  • Tags
                                  • Popular
                                  • World
                                  • Users
                                  • Groups