It’s just data

Dynamic Typing

Sean McGrath: Dynamic typing is good for you. Its good for programming. Its good for data. It makes it possible to develop software without a crystal ball and without a 10x hit between "product" and services thanks to the extra levels of loose coupling it introduces into your designs.  If you haven't yet tried it - get Python, get XML and do something non-trivial with the combination.  Give it a couple of weeks to sink in. I promise you, you won't go back.

Dynamic Typing. Sean McGrath: Dynamic typing is good for you. Its good for programming. Its good for data. It makes it possible to develop software without a crystal ball and without a 10x hit between "product" and services thanks to the extra...

Excerpt from Tekblog at

Dynamic language tidbits

James Strachan is conflating the language and the IDE.  It is not impossible to write an Eclipse-like IDE for a dynamic language.  Python and Perl are not the only dynamic languages in the world. Just because you don't see them for Python,... [more]

Trackback from Ted Leung on the air

at

Dynamic language tidbits

James Strachan is conflating the language and the IDE. It is not impossible to write an Eclipse-like IDE for a dynamic language. Python and Perl are not the only dynamic languages in the world. Just because you don't see them for Python, Perl or...

Excerpt from Ted Leung on the air at

Dynamic types vs. polymorphism.
Objective Caml is a strongly typed language where types are determined at compile-time. But the programmer doesn't have to declare any types (what you seem to think requires a crystal ball).

Check out http://caml.inria.fr/

Cheers
Dumky

Posted by Dumky at

Dumky, NetRexx is a language which also has static and strong typing, but doesn't require the programmer to explicitly declare the type.

Languages like Python and ECMAScript allow "strange" things like the ability to dynamically add attributes to existing instances, and even have two instances of the same class have different members.

Posted by Sam Ruby at

Let's not forget the first refactoring tool was the Refactoring Browser for VisualWorks Smalltalk, a dynamic language.

Other advantages of dynamic languages at Straightjackets

But earlier in the blog I speculate, and for some time have speculated, that dynamic languages and implicitly more expressive type checkers like those for o'caml, Haskell, etc. will converge somehow 5-10 years down the road.

Posted by Patrick Logan at

Patrick - the key question in my mind is not when such things converge in the laboratory, but when will such things converge in the mainstream?

It goes without saying that when it does occur, the LISP and SmallTalk people will say that they did it first, back in the 1960s and 1980s respectively.

Posted by Sam Ruby at

Sam, I know it's a relatively small market, but Lisp and Smalltalk have been out of the lab for years. IBM's direction before Sun's introduction of Java was clearly aimed at Smalltalk and they were having a good deal of success with it.

There is no doubt that the Smalltalk refactoring browser was first. (Reading Martin Fowler's book will back the claim.)

But when the RB came out, it was aimed at, used, and ultimately made the de facto choice for commercial Smalltalk development.

Posted by Patrick Logan at

In fact, following  up on what Patrick said above - VisualWorks has had the Refactoring Browser as the core system browser for the last two releases.

Posted by James Robertson at

Dynamic language tidbits

James Strachan is conflating the language and the IDE. It is not impossible to write an Eclipse-like IDE for a dynamic language. Python and Perl are not the only dynamic languages in the world. Just because you don't see them for Python, Perl or...

Excerpt from Ted Leung on the air at

Sam, ECMAScript definitely has a very flexible nature. But O'Caml is strongly typed, which makes debugging easier in my sense, as a variable only has one type while it is defined.

I think that debugging dynamically added attributes/methods on a specific javascript object is rather confusing, even though it is powerful. But for those interested, check out these two tutorials for more details:
http://www.flws.com.au/showusyourcode/codeLib/code/JSObjects.asp?catID=2
and
http://www.crockford.com/javascript/inheritance.html

<promotion>Also an OO in javascript intro on my blog :-) http://blog.monstuff.com/archives/000015.html  </promotion>

Cheers
Dumky

Posted by Dumky at

I am not sure that Static Typing vs. Dynamic Typing really captures what is being discussed.  C (Java, PL/I, etc.) attach the type information to the name and use the name to map memory.  The content in memory is just some bits.  Interpretation of the bits is based on the information associated with the name.  That's why declaring names as int, float, etc. is so important.

In Python, the type information is stored with the bits.  The names get "bound" to the bits which are already tagged with type information.  In other words, we no longer simply deal with bits, but with bits that are typed - objects.

Perl gets dynamic by having types associated with the operators.  + is numeric addition.  "abc" + "def" gives 0.  eq is string comparison.  "abc" eq "def" gives false. == is the numeric comparison. "abc" == "def" gives true.

So I am suggesting that Python is strongly typed, but the type information is kept with the bits.  Python does not implicitly transform the bits from one type to another.  You must use functions like int() to transform values between types.  This isn't very dynamic.

I think Python has found a terrific balance between ease of programming and preventing type errors from yielding unexpected results.

Posted by lloyd kvam at

Python is definitely strongly typed.  Simply doesn't statically associate types with variables.

In particular, the following will behave quite different based on the types of the variables passed to it.

def sum(x,y): return x+y

Posted by Sam Ruby at

Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as

Posted by free sports streaming sites at

Add your comment