Python/Ruby: script languages, nothing more.24
rzwitserloot posted in programming on October 1st, 2006
Tim Bray of sun has been interviewing the JRuby guys and stumbled upon the crux of why Python and Ruby are effectively sucktastic when it comes to implementing projects of more than, say, 6 manmonths. They don’t play ball with the IDE. Rather unfortunately, this conclusion leads him to the wrong realization. See here, the fantastic delusions of an evangelist.
To summarize, he advocates letting the IDE watch over the shoulder of the interpreter as it runs through a unit test suite. That way, the IDE can identify for each variable it finds in the code which types of values it ever holds. (Ruby/Python aren’t weakly typed; each object does have a very specific type. It’s just references to them are untyped, so for any given occurence of a reference in the code, the IDE has no clue what it could contain. Objects exist only at runtime, not at compile (read: writing code) time).
Hold the phone! Are you nuts? Short of 100% code coverage any refactorings are always an unknown, and any bugs caused by it will by definition not be caught by any of your unit tests. Reaching 100% code coverage itself is waaaaaaaaaaaaaaaaaaaaaaaaaaaaay (I cannot stress enough by how many factors!) more work compared to the very mild job of adding types to all your declarations, something your IDE practically does for you, I might add. Not to mention the time it saves you on debugging.
I’m beginning to believe that python/ruby folk are so obsessed with unit tests exactly because they can’t trust their compiler any farther than they can throw it, because it can’t help but see your code as a pile of text instead of a structured set of links. (For you agile fanboys out there who believe my statements that unit tests aren’t all that useful and generally a waste of time, remember, agile blows).
Tim, and all others convinced by the droning of the evangelists out there: It’s really quite simple. An IDE is a fantastically useful device to work with, and purposefully eliminating any chance your IDE has of becoming a second pair of eyes (because, let’s face it, nobody really does pair programming, it just sounds nice) is a monumental error.
Python and Ruby are scripting languages because they do not scale along the development process. Working on a big project with more than one person very quickly spirals out of control in languages like that, without an IDE to keep ordnung. I’m not saying java is freed of all blame here - there’s loads of boilerplate and syntax issues that can be cleared up (without ruining the strengths of java like Gafter’s and Gosling’s latest brainfart, The closures for java proposal), and there’s a general feeling amongst the community that convoluted forests of factories and XML settings files make for ‘flexible’ code. Unfortunate. At least these issues are fixable.
Weaning python and ruby off of their obsession with dynamics is impossible.
