Ruby developer. CTO. Swimmer. Always trying to write more
So, last week I mentioned my first python script. Last night, I wrote 2 more scripts (they’re macros for incorporating BibTeX entries into a MoinMoin wiki).
The best thing about Python is its brevity. I’ve written three scripts and none of them are longer than ¾ page. Admittedly, I’ve used existing libraries to make my life easier but I’m sure I couldn’t have written them as quickly or as concisely in Java.
The worst thing about Python is the lack of clues. This has two aspects: comments and types. For some reason, it seems that writing in Python means you comment less, or perhaps just in the script header. This is a bit bizarre since more comments are needed with a terse language than with something verbose like Java. The other problem I have found it the untyped nature of Python. What do you do when presented with a method
execute(macro, args). How do you use
args? Is it a list, a string, an object? Ah! That really pisses me off. If anyone can tell me how they explore third-party Python libraries in order to figure how to use them, please leave a comment.
Still, for doing quick tasks, Python is pretty great! The whole structure-by-indentation thing hasn’t bothered me as much as I thought it would but I still think that underscores in method names are a crime.