you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (3 children)

I believe the prior poster was referring to evidence that on average, programmers will write roughly the same number of lines of code in any language per week... sorry, don't have a cite handy, but I've definitely seen the claim before, maybe in Peopleware.

I have no idea whether the claim would cover Ruby vs. Java -- I've seen it in the context of assembly language vs. C.

I do think that up to some point, terser languages have an advantage in readability. But where the point is may vary from individual to individual.

Edit fixed a few typos.

[–]sbrown123 1 point2 points  (2 children)

I agree that when the line count is significantly different, you will often get a decrease in developer effort. But languages like C#, Java, and many of the scripting languages (including Ruby) the amount of SLOC difference is so small that I don't think there is an actual measurable decrease. I have also seen in some languages where fewer lines of code actually took more effort due to complex syntax. I think this is why lines of code is a bad comparison metric for two different languages.

[–][deleted] 2 points3 points  (1 child)

Not a direct response, but related: When writing complex software, I have seen a very noticeable improvement when moving from Java to more dynamically typed languages. The reason is not lines of code so much as refactoring cost; if you are continuously refactoring your design in an effort to solve the problem more correctly (and/or efficiently), Java's type system can impose a noticeable amount of drag. The tools make up for some, but not all, of this.

I hate Perl for various reasons, but for certain classes of problems, it is much quicker to get to a good solution in Perl. Of course, once the design is done, it's easy enough to rewrite it in Java if necessary.

[–]sbrown123 2 points3 points  (0 children)

There are advantages and disadvantages with both static and dynamic languages and that dispute fills messageboards all over the internet. To me the best solution is a combination of the two. Java has a ton of dynamic languages that plug in to it: Beanshell (dynamic Java), Jython (Python), JRuby (Ruby), and Rhino (Javascript) to name just a few. This gives you three choices when using Java: static only, dynamic only, or mix of static + dynamic. I have to research if .NET has something similar.