Python – maybe you know – is a computer language that has its five minutes. What’s more the python’s five minutes is going to last much longer, as e.g. Google’s been involved into using this for serving some services.
Python is a dynamically typed language (it means that you don’t have to declare exact types while declaring a variable – a good and a bad thing – asĀ usually, there isn’t anything just good or just bad).
Some cons of Python
A very short list (there will be examples and more information in future posts):
- No const class fields.
- Docstrings are fine, but I can’t declare comments describing class fields, I’ve been using doxygen with C++ and there we have such a way for generating documentation for classes.
- Terrible syntax – blocks declared using whitespace (sometimes I think like using the whitespace language).
- Terrible syntax – try to copy some lines from one file to another. You’ve got 99% of a chance to have something incorrect. Incorrect here means not only that after the code paste there will be problems with interpreting code, sometimes I have problems that code is correct (as for the interpreter) but it works in a quite different way than I wanted.
- No real constants, they are defined by some convention: constants have to be named with capital letters only what means for others: “Don’t touch that”. But there is nothing that prevents some funny hacker from changing them.
- Due to the dynamic nature of Python, you’ve got to prepare a lot of tests. Test of course are good, but as for a C++ program you’ve got to test only program logic, you know that if a function gets an integer as a parameter, the compiler would check that for you. In Python you have to even check if a function parameter is an object of a class that you’ve expected. Truly said: no one makes so extensive testing. The same goes here for other dynamic languages like ruby.
What is better?
- Perl – well… no, due to some funny random code execution (post about this is almost ready)
- Ruby – that’s my favourite so far
- Java – too heavy as for my needs
What next
I’ll give Ruby a chance, now I code in Python, I’ll see how it works.
Related posts:
- Naming Convention aka PHP vs Python Is Python really better than PHP? I doubt, and in...
- Python And Unicode… What a Crap I was trying to implement something really simple in Python....
- Indentation Checking in Ruby In Python blocks have to be indented just because the...
- Trying to Use Database in Python Why the f**** there is nothing like DBI in Python?...
- Virtualenv Tutorial What is Virtualenv Virtualenv is a great piece of software....
- Why Ruby on Rails Migrations Don’t Work Ruby on Rails Migrations Migrations in Ruby on Rails provide...













I have to disagree with you on this matter. I’m currently studying python programming and I like it a lot. The language is easy, the syntax is clear, and you have a lot of support on the WWW. You will find a lot of tutorials, and examples. Even good is using it nowadays.
Cheers,
Daniel.
I agree with Daniel, the syntax’s not terrible, it’s wonderful and REALLY easy to read.