Announcement

Collapse
No announcement yet.

Python 3.4 Steps Closer With New Features

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

  • #31
    Python has "real object-oriented programming". "different syntax" != "not real".

    Oakley Sunglasses

    Comment


    • #32
      Originally posted by droste View Post
      Because it's so easy with brace-languages! You write your code in sloppy and formless way and just run an indention program on save I love the brace-languages!
      +1 on this. Glory to the braces

      Comment


      • #33
        Originally posted by kigurai View Post
        And there's your problem right there

        Yes, the indentation-controls-scope feature of Python is a bit scary when you start. And it is horrible when you have very long blocks of code.
        But the neat thing is that since that is horrible, you will actively try to make your blocks of code shorter which usually means prettier and more understandable.

        EDIT:
        Also, the problem with scope and long blocks of code is primarily when they are both long and have deep nestings. So avoid long deep nestings
        It's a stupid solution for a bunch of reasons in addition to those you listed. It breaks copy-paste, and it breaks when people use different editors (yes, some editors have tab-spaces conversions enabled by default; that's bad too, but it's a fact still).

        Comment


        • #34
          Originally posted by curaga View Post
          It's a stupid solution for a bunch of reasons in addition to those you listed. It breaks copy-paste, and it breaks when people use different editors (yes, some editors have tab-spaces conversions enabled by default; that's bad too, but it's a fact still).
          Which is why you are encouraged to use 4 spaces for indentation (see PEP-8).
          I'll gladly trade "breaks copy-paste when copying bad code" for all the good things that I get.

          Comment


          • #35
            Originally posted by curaga View Post
            I disagree, Python is the very example of languages that force things on people. Let's start with its absolutely horrible forced indentation.
            Your list probably ends there too, but... there is no "forced indentation". Indentation is a requirement to make code readable. Are you suggesting you code without any indentation? No one who writes code with the intention of anyone (including themselves) looking at it again indents code. So what's the problem? You're not being forced to do something you were going to do anyway.

            Comment


            • #36
              Originally posted by alcalde View Post
              Your list probably ends there too, but... there is no "forced indentation". Indentation is a requirement to make code readable. Are you suggesting you code without any indentation? No one who writes code with the intention of anyone (including themselves) looking at it again indents code. So what's the problem? You're not being forced to do something you were going to do anyway.
              I think he have right. python is not supposed to be a language with twenty eleven different way to do same thing. You should use a pythonic way. It exist a estetic how python code is supposed to be. If you like to mold the language after your programming habbit it exist better language.

              Comment


              • #37
                On another note, langages forcing you to do something in a particular way is not necessarily bad. To make something better, sometimes it's better to start taking things away, rather than adding more.

                Comment


                • #38
                  Originally posted by alcalde View Post
                  Your list probably ends there too, but... there is no "forced indentation". Indentation is a requirement to make code readable. Are you suggesting you code without any indentation? No one who writes code with the intention of anyone (including themselves) looking at it again indents code. So what's the problem? You're not being forced to do something you were going to do anyway.
                  I write indentation how I like it. Python would force me to use a _specific_ type of indentation, which I find horribly ugly. So yes, it would force me to do something I would not otherwise do.

                  Comment


                  • #39
                    Originally posted by curaga View Post
                    I write indentation how I like it. Python would force me to use a _specific_ type of indentation, which I find horribly ugly. So yes, it would force me to do something I would not otherwise do.
                    The don't use Python. SImple as that. The rest of us will continue writing nicely indented Python code anyway

                    Comment


                    • #40
                      Originally posted by curaga View Post
                      I write indentation how I like it. Python would force me to use a _specific_ type of indentation, which I find horribly ugly. So yes, it would force me to do something I would not otherwise do.
                      What "specific" type of indentation would that be? Python doesn't care what sort of indentation you use, all that matters is that a single code block has consistent indentation.

                      Comment


                      • #41
                        Originally posted by kigurai View Post
                        The don't use Python. SImple as that. The rest of us will continue writing nicely indented Python code anyway
                        I don't use it, and am happy without? I just had to intervene when someone claimed python gives the ultimate freedom, when it clearly doesn't.

                        Comment


                        • #42
                          Originally posted by curaga View Post
                          I write indentation how I like it. Python would force me to use a _specific_ type of indentation, which I find horribly ugly. So yes, it would force me to do something I would not otherwise do.
                          Either way, you're supposed to use four space indention as per PEP-8.

                          Comment


                          • #43
                            Originally posted by uid313 View Post
                            Either way, you're supposed to use four space indention as per PEP-8.
                            That's complete crap, you're not "supposed" to do it. You only do it if the pros outweigh the cons in any one particular context. If you you're "supposed" to do it, it would be forced -- it's not.

                            Comment


                            • #44
                              Originally posted by curaga View Post
                              I don't use it, and am happy without? I just had to intervene when someone claimed python gives the ultimate freedom, when it clearly doesn't.
                              So what do you think about lisp/scheme?

                              Comment


                              • #45
                                Originally posted by Akka View Post
                                So what do you think about lisp/scheme?
                                I don't have enough experience in it to say one way or the other.

                                Comment

                                Working...
                                X