Monday, April 20, 2009

10 things I like about python

-- OO is easy. You can easily have as many public classes in your module. Create classes on the fly. -- List-comprehension This is clearly stolen from Haskell, but even this seems to be enhanced. Thought I miss the underscore. -- self self is your friend. With referring explicitly to the namespace, in the long run, this clears things up. -- Special methods You don't have to use getters and setters. This is simply great! -- Aesthetics You don't need no braces around if, you can do 0 < x < 1, Python is sexy code. -- Procedures are first class citizens because you can * store them in variables, * use them as arguments, * or results. -- Jython, IronPython, CPython You can use different platforms. You can even use it as a stored procedure in your Oracle-Database. -- Nested functions lambda is really out if you want documented code. Just nest a function inside of the function. It is called packaging. -- SciPy and matplotlib My other major is Econ, so I need to do computing for a living. What is nicer, than to use your favorite PL for this. -- Dynamics Store the code as text in a database, reuse it, deploy it. If you are creative, you can do a lot more than with a static language.

No comments: