About this entry

Exploring non-C-based languages

Today I made my first application in Django – yet another framework for web application.

Not so much sensational fact in general, but for me  it actually was. And that’s because it’s written in Python. I don’t want to create a scandal, but I’ve never used Python before today.

In fact, curly-bracketed programming languages has been where I felt home for really a long while now, and I was just scared to step out my syntactic comfort zone: C, C++, Java, PHP and Javascript are different in many ways, but they all push the same buttons in our muscle-memory.

for ( i = 0; i<10; i++ ) {
    ...
    if ( i > 5) {
        ...
    }
    else {
        ...
    }
}

Except for some dollar sign, this small piece of code can belong to any of the above mentioned languages. That’s a small piece of evidence: use of braces, fundamental keywords, use of semicolons, all contribute to identify the C-based programming languages .
It took to me a considerable leap of faith and bravery to make the jump and have the first look on what’s beyond the line, exploring Python for the first time. But then, I was really impressed.

Exciting stuff about Python

Syntax expressiveness remains as high as C-based languages even if blocks are not delimited by curly braces. Actually, code is unbelievably clear even if blocks are simply NOT delimited.

Where’s the magic? Indentation.

Python takes indentation so bloody seriously that the interpreter will refuse to execute the code if not properly indented. Yes, badly indented code is not tidy code, untidy code is bad to read, bad to read code is less useful code for people. Hence Python won’t execute.

It took so long for computer science to understand that the scarce resource in programming is the human resource, and languages should be optimized for people, not for the CPU.

Syntactic correctness may be enough for a computer, but it’s right that a language optimized for the people requires more than that. And Python is really designed around this concept.

But there’s more than just style-aware syntax constraints: fully and natively supports OOP principles (you should have a look to what the string class can do). However, Imperative and Functional styles are viable as well in Python.

With such an enormous amount of bindings and libraries, you could use this language to build really anything. Included Web, Network, GTK and 3D applications.

Python stays to Perl as Java stays to C.

Things I look forward to find in Python world

I don’t know if it was Django web framework, but still error messages were not so crystal clear. Even PHP prints more useful statements. However, full stack traces always appeared.

I also would like a good debugging environment, for example I’ll have a look at Eclipse based projects good enough to show me what’s inside variables and so on, like I do in Java.