jump to navigation

Python.. ssSSssSSShhhHHHHhh October 8, 2008

Posted by leppastar in Uncategorized.
Tags:
1 comment so far

As a BS Computer Science student, I’ve encountered many programming languages. C, Java, Assembly, Oz, Lisp, Prolog and many more. Recently, I’ve learned another language. And so far, it’s my favorite. It’s none other than Python.

I’ve just learned Python so my comparison here is not really in-depth.

Anyway, here are the reasons why I love Python:

1. It has no ending marker. In other languages like C and Java, you must each statement or expression with a semi-colon. In Prolog, you must end it with a period. In Python, just finish your statement and you’re done.

2. Blocks are not enclosed with parenthesis or curly braces. In C and Java, each block is enclosed in curly braces. Every condition is enclosed inside a parenthesis. In lisp, everything is enclosed in parenthesis. There’s just no end in parenthesis. On the other hand, in python, no more curly braces nor parenthesis for blocks. All you have to do is to indent it properly. Wish you would normally do with other languages. Besides, more readable if it’s indented.

3. It’s dynamically-typed. Just like lisp, prolog and oz, you can create variables instantly. You don’t have to assign its type. Plus, you can change its type. For example, you used it as an integer. You can use it next time as a string. Just assign a new value to it and it’s type is automatically changed.

4. It’s very high-level. You don’t have to concern yourself with low-level stuffs like the inner workings of for-loops or sorting algorithms. Most of the functions you need are already built-in. You just have to search it using the help function. Hence, more time for devising algorithms and less time for coding. hehe.

5. You can create list/tuple/dictionary of different types. For example, you can create a list with an integer, a string, and a list. The size is not even fixed. You can even extend it (though not on tuples). You can create an initial list and not concern yourself with the other contents. Plus, list functions are also built-in.

That’s it for now. I’ll post another blog once i get to know it better. But so far so good. I love it and i still am lovin’ it. Hope you love it too!