4 ms·
Natural languages and programming languages are two very different things. The choice of natural language usually doesn't make a huge difference to the length a
by weavejester 17y ago
Natural languages and programming languages are two very different things. The choice of natural language usually doesn't make a huge difference to the length and quality of a sentence. Conversely, the choice of programming language can make a very big difference.
- axod 17y agoI disagree. Most natural languages have bugs. These bugs often provide the basis of jokes, but they're bugs. Ambiguity, verbosity, tongue twistiness, etc in natural language would certainly cause you to steer clear of certain words, but we don't feel the need to reinvent the English language every year, or keep switching to other languages that seem to have less bugs.
- weavejester 17y agoWhat 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.