Joao Pedrosa
Posts: 114
Nickname: dewd
Registered: Dec, 2005
|
|
Re: Java / Ruby comparison
|
Posted: Jan 5, 2006 11:36 AM
|
|
"The nice thing about static typing and a compiler is that this provides a "test" up front that will come much closer to validating your callee/caller compatibility on the first shot. I don't believe for a moment that it is cost effective to write sufficient tests, for every project, to provide 100% type compatibility testing that a compiler and types can provide over and over. Some might argue that there is a movement of cost from development time with types to testing time without types, but I don't see that being a realistic, works everytime argument. There are probably examples to cite, but not concrete repeatability."
First of all, I agree that creating test code for everything is close to impossible, and I don't claim that "Test Driven Development" is any silver bullet. I don't support "TDD" as a "promise land". On the other hand, by creating units of code reuse (components), we ensure that we have good APIs and that they are used all the time (so, they are tested all the time), meaning that once the bugs are eliminated from the components, we have a good and stable code to reuse as much as we like. I defend components as the "promise land". And the more succinct the component is, the more that it behaves like a component, and languages like Ruby really help in creating components or libraries that behave like components, as well as the language itself is a good means for consuming (using) the components, instead of creating another layer with XML, Template Library, etc.
"What we need to speak to is the rather small advantages any of these languages provide to the total programming experience compared to what we had 10 or 20 years ago. The languages haven't improved things. It's the libraries and the IDEs that the languages have inspired and allowed to be created that are making the differences."
Here is how we can create a Thread in Ruby:
Thread.new{ sleep 1000 }
And we can access variables from the thread without needing to declare them as final. Imagine my surprise to find that Ruby had threads in an easier way than in Java, on the other hand, we still need the Native Threads, though by the tradition of Ruby, once the Native Threads arrive, I hope they will be just as easy to use.
So, in my opinion and experience, languages do influence the programmers, though we have many different kinds of programmers, varying from the hobbyist (me) to the professional (millions of Java programmers). Just like Sun created the NetBeans, IBM created the Eclipse, Borland created the JBuilder and the supporting tools, I'm creating my own development tools, the difference is that I support Ruby and I don't need to support genericity in the same way that those companies need. You may have all the genericity that you need, but sometimes people need some cozy tools like Rails, for example -- and they are the same kind of professionals to which Java is appealing in a general sense (tool users).
|
|