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

Saturday, October 13, 2007

Invasion Of The Dynamic Language Weenies

Here's a great post I've missed - I've recovered it thanks to reading paddy's blog. Here's a nice sample:

Let's put both these claims to the test with a few examples. If you're unfamiliar with Ruby, see how natural the following code seems to you:

[1,3,5,7].inject(0) { |x,y| x + y }

Can you tell what it does? It's an expression whose value is the sum of all the elements in the array [1,3,5,7], which is 16. Let's try this exercise the other way around. If you had not seen the above, what syntax would you think Ruby uses to sum the elements of an array? Here's a guess:

for every x in [1,3,5,7] { total += x }

Why did I guess this particular construct and not any of the infinite number of alternatives? Because this is what might seem "natural" to someone with some programming background.

The complete post reading is a must. As a statically typed kind of guy, you could expect me to trash some of these dynamic languages. But I won't. I feel some of this languages constructs are very important for us - most of us feel our limitations on the languages we use, some regarding the lack of expressiveness, other regarging abstraction limitations, even lack of brevity.

One thing is for sure: we, developers, tend to be religious about these choices. And that is just wrong. I know what I'm talking about, I myself was a statically typed curly brackets champion for years.

The future will be about different languages for different needs, as craftsmen do with their tools - can you imagine build a table from scratch using nothing but a hammer? But just like them, we will prefer the tools we are feel conformable with - changing that over a hype is usually a mistake.

What I hope for the future is that some of this constructs are imported into my daily-usage languages. And that languages inter-operate more, so I can easily use languages according to their capability to address certain domain needs.

No comments:

Development Catharsis :: Copyright 2006 Mário Romano