I am new to Python but I have programmed in other programming languages such as Java before. I have already started to feel a few differences which I don't know whether they are good or bad.
1) Type Safety
Python is not type-safe, but Java is type-safe. Though it appears to be a cool feature while writing a program, how cool it is when you read the code? For example, the results from a database can only be stored in an object of type ResultSet in Java, but here it's not the case. And I am sensing a big problem here, do you guys think programming without type-safety is a problem with Python? I feel type-safety is kind of a safety-net while programming and to program without it is like swimming without a safety-net in a deep ocean.
2) No Variable Declaration Needed
This doesn't sound like a feature to me, in fact it scares me. OK, we don't have type-safety, but this I think will cause so many programming errors that will be very hard to figure out. Is there any way we could force all the variables to be declared before using? Like Option Explicit of Visual Basic 6.
3) Non Object-Oriented-ness
I have just started reading the Python manual and I saw a few chapters on Classes but we can also program without a class (I mean C style). Isn't functional programming an old-old-thing? And calling functions like set('abdbd') (without qualifying it with a class name) is very new to me and I am feeling very insecure.
4) More Runtime errors?
Well, I am not sure about this but I misspelled a variable name 'cursor' as 'curor' and I called the close() method on it. I was using PyDT plug-in for eclipse and my IDE didn't show me any errors (I thought it would detect) and eventually it failed at run-time. Isn't this terrible? If we had type-safety in Python I couldn't have started my problem without rectifying the error (misspelled variable name) instead it failed after executing half the code.
And moreover, even if spell my variable name correctly, not all the methods are shown on auto-complete by my IDE. For example, cursor.close() was not shown by my IDE (PyDT) in the auto-complete, but it is a valid method! This never happens with Java.
I am not accusing Python's design or the Python programming language, in fact I work at a place where Python is our KING but I am new to it and these are my first reactions after trying out the language for the last 2 days and I am very eager to program in a Pythonic way
I hope the Python gurus over here can clear my doubts, and very excited to be the newest kid on the block.
-- Srikanth


