Saturday, September 18, 2010

My praise for Python language

Disclaimer: PHP is my main scripting tool. I still prefer PHP for things related to HTML. Python threads looks like a total copy from Java's, but some concepts of Python have me dreaming too much...

I like when languages focus on both, problems and users. There are still many other common problems that bothers developers everyday, but I like like when solutions go towards freedom, instead of going towards constraints (although the world itself is a constraint).

Don't you find it rude to use Eclipse, NetBeans, VisualStudio or Zend Studio on EVERY computer you will ever use, only to check the a method's syntax? Programming environments should be cheaper and lighter... nevertheless, these comments looks contradictory...

When you unify several complex concepts into simple principles, you feel a surge of freedom in your brain, head, body, self, ... well, whatever you choose. Well, that's what I felt when I discovered that I can slice arrays the same way I slice strings.
  • If you have no text editor for coding, it brings Python GUI and a prompt to make tests.
  • It forces you to tabulate your code, which makes code looks nicer
  • Nested block delimiters reduced: neither {...} nor begin...end
  • help() and dir() functions: pass any object as a parameter and look.
  • The way you can access your own packages and modules
  • Built-in: highest integer number you can express is limited only by your computer
  • Built-in: complex number calculations (2+3i)
  • Its slicing system for arrays and string, for example: "python"[1:5:2]
  • dict.items() and enumerate(array)
  • Integer division for floating point numbers, without casting
  • You can use named parameters, for example: print my_page(head='Hello', foot='Bye');
Vaguely explored:
  • Its flexible object definitions. It looks more flexible than JavaScript definitions.
  • Lambda
  • Jython and binaries

No comments:

Post a Comment