November 13th, 2004, 12:52 AM
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?
November 13th, 2004, 04:02 AM
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.
November 13th, 2004, 05:00 AM
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