Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 45

Thread: Python 3.4 Steps Closer With New Features

  1. #31
    Join Date
    Sep 2013
    Posts
    7

    Default

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

    Oakley Sunglasses


  2. #32
    Join Date
    Jul 2011
    Posts
    368

    Default

    Quote 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

  3. #33
    Join Date
    Feb 2008
    Location
    Linuxland
    Posts
    5,187

    Default

    Quote 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).

  4. #34
    Join Date
    Nov 2012
    Posts
    210

    Default

    Quote 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.

  5. #35
    Join Date
    Sep 2011
    Posts
    74

    Thumbs down

    Quote 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.

  6. #36
    Join Date
    Jul 2011
    Posts
    368

    Default

    Quote 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.

  7. #37
    Join Date
    Jun 2011
    Posts
    57

    Default

    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.

  8. #38
    Join Date
    Feb 2008
    Location
    Linuxland
    Posts
    5,187

    Default

    Quote 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.

  9. #39
    Join Date
    Nov 2012
    Posts
    210

    Default

    Quote 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

  10. #40
    Join Date
    Feb 2011
    Posts
    1,243

    Default

    Quote 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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •