Thread: Downsides?

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    73
    Rep Power
    10

    Downsides?


    I have read a lot of good things about Python, but no one seems to want to list the things that would turn someone off Python. One of the things that I think of is that it looks like it has an error prone syntax (no braces, and it seems that the tab button will cause your code to return an error). Are there any other downsides that one should consider?
  2. #2
  3. Mini me.
    Devshed Novice (500 - 999 posts)

    Join Date
    Nov 2003
    Location
    Cambridge, UK
    Posts
    783
    Rep Power
    13
    The problem with Python for me is that there is no true compiler for commercial distribution of executables. Python is so powerful and quick to develop with it begs to be used for commercial applications. But if you want security of source code you really have to plan obfuscation into your code to make the reverse engineering uneconomic/impractical.

    The no braces thing looks like it will cause errors but actually the enforced indentation replaces braces and the the missing brace type errors do not happen. The indentation makes everyone's layout virtually identical which improves readability and understanding so those nesting type of errors are less likely or much more obvious.

    Yes TAB versus spaces can be a problem when you reuse a module or swap editors. But most editors that support Python highlighting have tools to fix this problem in a few seconds before Python ever gets to report it.

    grimey
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    Here are some of annoyances, off the top of my head...

    * using whitespace does not always travel well, especially on the web. Posting code on a web page can end up stripping it out, and I have even seen code printed in DDJ where the formatting had been removed somewhere in the process.

    * When developing as a team you need to make sure that everyone has the same tab settings on their editors. Ditto for using third-party code - you need to make sure it conforms the python standard (4 spaces, no tabs).

    * The lack of static typing means you need to document your code more, especially comment what parameters a function takes, and what it returns since this is not apparent from the code. This is less of an issue with small programs, but when you have 100,000 lines of code written by a team of 6 people it can be a problem.

    * The lack of static typing also makes it harder for tools such as refactoring browsers. One of the big advantages of Java is the refactoring tools in eclipse. There is Bicycle Repairman for Python, but this is much more limited.

    * There is no clear 'one way to do it' for web development. PHP has all its web tools built in, and Java has a set of tools that are standardised and widely used - J2EE, JSP, Tomcat etc. Python has dozens of web server frameworks and libraries so anyone building a web app has a tough time knowing when to start. This is starting to change with the emergence of the WSGI standard, so the existing frameworks will become more interchangeable.


    These are all minor issues though, given the huge advantages Python has over statically typed languages such as Java and C#. The 100,000 line program I mentioned about would probably be 1,000,000 lines in Java, and the team at least twice the size.

    The biggest disadvantage that Python has is that it does not have the marketing muscle of Microsoft or Sun behind it, so does not even appear on the radar of many companies that could benefit from using it.

    Dave - The Developers' Coach

IMN logo majestic logo threadwatch logo seochat tools logo