I do what I can

Random thoughts from Mauricio Teixeira…

In love with Python

with one comment

When I first heard of Python, and tried messing with it, I thought it a little bit strange. The way you declare variables, use objects, import modules etc is quite different from Perl (the language I’m used to code for a long time). I felt incomodated specially by not having brackets around my blocks of code.

Besides the natural (forced) code identation from Python (I like, but it’s tricky), I’m falling in love with it. It’s an elegant language (besides the fact that it’s a little confusing to find where a code block ends) and it’s quite easy to learn. The default modules that come with the basich package has been more than enough for my sys admin scripts until now, and I didn’t ever need to fetch any outside packages (CPAN really bothers me).

As always, each language has it’s pros and cons. But as of now Python has given me more pros. I would say that Python strongest features are speed, lesser code, and easy var handling (no need for $), while Perl works better for visual block recognition (because of the brackets) and better ways of handling text, specially with regexes (well, that’s the main focus of Perl).

I think now I can say I serve two masters. 😉


Written by netmask

fevereiro 10, 2006 às 15:19

Publicado em linux

Tagged with

Uma resposta

Subscribe to comments with RSS.

  1. I like ruby. It’s on the news currently thanks to Rails, which I don’t like, but I liked ruby ever since I first tried it. Python’s lack of conciseness is not for me. Ruby, “a better Perl”, is very much like Perl, except it’s properly object-oriented (I mean like Smalltalk, not like Python) and makes heavy use of functional programming techniques (mostly the closure-like code blocks, which I’m in love with).

    Leonardo Boiko

    fevereiro 10, 2006 at 16:18

Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair /  Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair /  Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair /  Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair /  Alterar )


Conectando a %s

%d blogueiros gostam disto: