4 ms·
What do "bugs" have anything to do with it? Natural languages take a long time to learn, and do not differ considerably in expressiveness or conciseness. Prog
by weavejester 17y ago
What do "bugs" have anything to do with it?
Natural languages take a long time to learn, and do not differ considerably in expressiveness or conciseness.
Programming languages take a relatively short time to learn, and there are large and significant differences in expressiveness and conciseness.
For instance, contrast:
sum = foldl (+)
And:
public static int sum(Iterable<int> numbers)
{
int total = 0;
for (int n : numbers)
total += n;
return n;
}
Rarely do you find such pronounced difference in expressiveness between natural languages.
- jacquesm 17y agoNatural languages solve these things with 'jargons', which are effectively DSLs. I isn't rare at all to come across words in one language that require a full sentence in another. Fingerspitzengefuehl in German is a nice example. It requires a full page of explanation: http://en.wikipedia.org/wiki/Fingerspitzengef%C3%BChl http://en.wikipedia.org/wiki/Fingerspitzengef%C3%BChl And it still misses some nuance of the German that I can't quite 'place my finger on'.
- weavejester 17y agoYes, there are individual words that may not have a direct equivalent in another language, but a language like German is not significantly more concise when applied to a complete document. If you have a 100K file written in English, it is unlikely you would be able to reduce that to a 10K file in German without significant loss of information. On the other hand, it wouldn't be unusual to find that 10,000 lines of Java could be written in 1,000 lines of Ruby (or Haskell, or Clojure, or...). Further, the effort of learning a new programming language like Ruby is significantly less than the effort of learning a new natural language like German.
- axod 17y ago>> "On the other hand, it wouldn't be unusual to find that 10,000 lines of Java could be written in 1,000 lines of Ruby (or Haskell, or Clojure, or...)." Only if you're comparing "Terrbile java programmer" with "good ruby/haskell/clojure programmer". Now that may be the same as average java programmer vs average ruby programmer. But that's not a fault of the language, it's a fault of some people using the language.
- weavejester 17y agoI disagree. No matter how knowledgeable the user, they are constrained by the capability of their tools. An expert logger with a flint axe isn't going to be able to fell them as quickly as he would with a chainsaw. Java is an extremely primitive and restrictive language, lacking a great deal of functionality that is used extensively in other languages. No matter how good a developer you are, there are fundamental limitations in a language like Java that can't be easily circumvented.
- axod 17y agoUtter BS. So now you've gone from "Java source code is 10 times the length of Ruby", to "Java is primitive and restrictive"? This is the sort of idiotic baseless language bashing that is such a waste of time.
- weavejester 17y agoJava source code is especially verbose because Java has a very primitive and restrictive syntax. This shouldn't be news to anyone. Java lacks macros, type inference, and currying. It lacks a concise mechanism for lambda forms, and variables in closures have to be made final. There is no way to delay evaluation of an expression, save through the default control structures. The generic typing system does not persist to runtime, and it does not support covariant or contravariant types. There is no multiple inheritance supported, nor any mechanism for mixins. Interfaces cannot be applied to classes after they are defined. Types are nullable by default, which is a remarkably dumb idea for a static language. Functions cannot exist outside a class, and the syntax is littered with redundant keywords like 'new'. Should I continue? Java's shortcomings are many and well known. Calling Java "primitive and restrictive" is not baseless language bashing; it's an observation of the design decisions made by the developers of the Java language.
- jacquesm 17y agoI think you are making my point rather better than I ever could.