Monday, July 5, 2010

As quick as a snake's bite ( maybe quicker! )...

Hey I'm back and this time with a programming language that I have enjoyed programming in for the last few months probably most of you know what I'm talking about form the title ... well for those who don't know about it it's Python it's simple to learn... it's simple to use... and it's simple to what not?
So those who are not using it I strongly suggest you start to use it. It's basically a scripting language, dynamically and strongly typed, it's object oriented, you can also program functionally ( although I'd prefer LisP or Haskell to Python to program functionally ) and it's really fast. Now many of you may be wondering what is dynamic typing.... Now let me first tell you that it's got nothing to do with typing on your keyboard, it's the data-type of a variable that is under consideration. Now if you look up "Dynamic" on http//:www.dictionary.com under 'Computers' you find the meaning:
  • affected by the passage of time or the presence or absence of power: Dynamic memory must be constantly refreshed to avoid losing data.
What I need you to look at is "affected by the passage of time or the presence or absence of power". Here the data-type of the variable is what is affected. Suppose we have a variable say x declared as:

x = 10

the data-type of x is an INTEGER.
Now suppose I do this:

x = "aj"

here the data-type of the same variable is now STRING.
But in a "statically" typed language as C or C++, the data-type of a variable once declared cannot be changed. But what is the use of this?
Well it's easier to code and it makes a lot more flexible.

No comments:

Post a Comment