Why Ruby?

Bruno Medeiros brunodomedeiros+spam at com.gmail
Tue Dec 21 11:50:21 PST 2010


On 11/12/2010 01:26, Ary Borenszweig wrote:
> http://vimeo.com/17420638
>
> A very interesting talk.
>

Whoa.

Over the last 5 years or so, with surge in popularity of dynamic 
languages like Ruby, Python, etc., I've seen several arguments put forth 
in favor of dynamic typing, and gradually I've always found there was a 
/subtle/ parallel with the arguments and reasons put forth for 
libertarian/anti-authoritarian/anti-corporate ideologies.
After seeing this talk, I guess it's not so subtle after all... ~_~'


Let me offer my thoughts on this. I don't think his argument is 
fundamentally rational. And I don't just mean wrong or illogical, I mean 
/irrational/: it is driven by an emotional bias of something not related 
to programmer productivity, which is what the discussion should be 
about. And I think his opinion is somewhat generally representative of 
many dynamic language proponents.

What I think is happening is this: These people, if and when they 
program on languages with static typing, they get annoyed by some (or 
all) of the aspects of static typing. That's normal so far, but now the 
problem is that while some of this annoyance may be driven from a 
genuine questioning of whether static typing is worth it or not (in 
usefulness and productivity), the rest of the annoyance is instead 
driven by an external emotional factor: if the language doesn't let you 
do something that it could easily let you do, then it is perceived as a 
"restriction of your freedoms". The programmer makes an emotional 
connection to personal issues unrelated to the field of programming. 
Another variant of this emotional response in this situation, and 
probably a much more common one, is not about political ideology, but 
rather the programmer perceives the language restriction to be part of a 
corporate culture that says that programmers are not smart enough to be 
fully trusted, and they need to be controlled to make sure they don't do 
stupid things. In other words the language thinks your are a dumb monkey 
who needs to be kept in line. Java is the poster child for this 
mentality, not only due to the language itself which is perceived to be 
simplistic, but also due to Java's strong association to the corporate 
and enterprise world. In a less extreme view, it is not about 
controlling stupidity, but controlling creativity (a view popular 
amongst "artist"/"painter" programmers). So here the programmers are not 
dumb, but still they need to be kept in line with rules, constraints, 
specifications, strict APIs, etc.. You can't do anything too strange or 
out of the ordinary, and the language is a reflection of that, 
especially with regards to restrictions on dynamic typing (and other 
dynamic stuff like runtime class modification).

Unfortunately this emotional response is often not fully conscious, or 
at least, it is not clearly expressed to others by the underlying 
programmer. And once this happens, _everything is lost from the 
beginning, in terms of trying to have a sensible debate._ Because from 
now on, these programmers will use half-baked arguments to try to 
justify their preference of dynamic languages. The arguments will be 
half-baked because they will try to argue in the area of effectiveness 
(programmer productivity), yet the main reason they like/dislike the 
language is the attitude of the language creators and/or community. 
(Interestingly enough, an incredibly similar cognitive-dissonance driven 
fallacy happens in discussions of actual political ideologies)

(Note, I'm not saying this is the case with all programmers, or even 
most, of the proponents of dynamic typing. In particular, nor I am 
saying it's the case with Ary :p )


BTW, for a while I was quite okay with this talk, because the author 
seemed to make clear what the liked about Ruby was the underlying 
attitude. He mentioned the language design goal of "making the 
programmer happy". He mentioned all those quirks of the community like 
the 'second' property, the 42 one, the cheerleaders at the convention, 
etc.. But then he made those comments about how static typing is there 
in Java and other languages because it is thought programmers are too 
stupid to be able to handle things otherwise (don't remember his exact 
words), or even worse, the comment/point about how many programmers in 
the audience made a bug because of not specifying a type... And from 
that point it was easy to go downhill, and indeed the talk did. Although 
I am happy for him making that explicit parallel with political 
ideology, it illustrates my point very well, even if not all Ruby 
developers would agree with him 100%.


Note that all of what I said above is a comment about the nature of the 
discussion of static vs. typing. I didn't make an actual argument for or 
against static typing (in case you were thinking this was the 
intention). I won't do that now, I'll just say that, not only I am a 
long-time proponent of static typing, in the last few years I've become 
a proponent of *even more* static typing. But done in a smart way of course.


-- 
Bruno Medeiros - Software Engineer


More information about the Digitalmars-d mailing list