Just sharing some of my inconsequential lunch conversations with you... RSS  

Wednesday, October 18, 2006

Reviewing a review

I've just read Joel Spolsky's review on "Beyond Java".

First, I'd like to point out that being slow to adopt new technology is a dangerous think to do in our line of busy, no matter how old we are. I'm 36, and I love adopting exciting new programming languages, whenever I see fit.

That doesn't mean I'm on an adoption mood toward typeless dynamic typing languages. Maybe because of the way I was educated, or based on my experience, I think today's typeless dynamic typing languages give us more problems that the ones they solve.

In a much smaller scale than Joel refers to, lets imagine a developer with the following experience:

  • developing in Visual Basic
  • developing in C / C++
  • developing in ASP
  • developing in ASP.NET
  • developing in Ruby / Phyton
This developer experience is not an evolution toward typeless dynamic typing languages. In each step he turned on typed static typing mode, to turn it off on the next step, and so on.

As I stated earlier, the present advantages of typed static typing languages surpass the advantages of the typeless dynamic typing ones. Why? Because the single fact of knowing the type in advance closes the scope of the operations, and that is a simple and cosy way to work. Ok, the scope limitation also limits the system capability, but so what? Most of us as developers live happily with it.

Lets end giving Joel a hand. One thing is for sure: the systems we develop are but rough representations of real life systems. And in real life, we aren't forced to declare the type of the entities to interact with them - they are (generally) implicitly retrieved by their nature...

Post-editing note: my thanks to André for the naming corrections present in his comment.

1 comment:

André Cardoso said...

I think you're confusing two axes on type systems:
- Strong Typing vs Weak Typing
- Static Typing vs Dynamic/Latent/Infered Typing

Ruby&Python have strong typing. It's just dynamic/latent/infered typing.

See:
http://www.codinghorror.com/blog/archives/000070.html
http://www.artima.com/intv/typingP.html
http://www.mindview.net/WebLog/log-0025
http://www.xoltar.org/misc/static_typing_eckel.html

The main theme is that static typing doesn't offer all that much (or is better replaced by unit testing), but dynamic typing and some other qualities of the languages improve the productivity of the programmers.
I can't really say if it's much more productive, but in many situations, I miss the ability to test some methods on the fly (which is common with interpreted languages), and I do feel that the current mainstream languages (C# & Java) are way too verbose (try and print something to the output with the previous versions of Java. It's not a one-liner).

Development Catharsis :: Copyright 2006 Mário Romano