News for hackers. Stuff that matters.
Re:Programming is hard by perlgeek on Wednesday October 20, 2010 @05:28PM (#1813181)
The idea that language limits what you can think has been obsoleted for quite some time, see http://www.nytimes.com/2010/08/29/magazine/29language-t.html for example.

'Languages differ not in what you can say, but in what you must say" -- Roman Jakobson

Re:Programming is hard by RiderOfGiraffes on Thursday October 21, 2010 @07:11AM (#1814970)
Many linguists claim that the Sapir-Whorf hypothesis (SWH) has been soundly disproved. They have bags of evidence to show that the usual, strong interpretation is false.

And yet every programmer with proficiency in several languages knows that some problems are easier solved in Python, others in C++, and others in AWK. Further, every polyglot I know will shift language according to nuances in the thoughts they're trying to express, because some languages have more/better/finer distinctions about different things.

In Spanish the words for "to wait" and "to hope" are the same. In some contexts the words for "Even" and "Same" are both translated into the Frech as "meme" (as in "meme chose" - "same thing"). Perhaps these conflations of words show a conflation of concept. Yes, the differences in concepts exist in the minds of the speakers, but the language to express them precisely isn't always there.

There's a Spanish joke: "¿Cómo se llama a un ascensor en Inglés?" - "Con su dedo." It doesn't translate into English - you need to read the Spanish. Again, vocabulary conflation.

SWH has been debated here on HN before, many times, and no doubt it will again, with the research-based linguists saying there's no difference in lanugage chosen, and the polyglots snorting derisively.

http://news.ycombinator.com/item?id=1505365

http://news.ycombinator.com/item?id=658951

http://news.ycombinator.com/item?id=218862

http://news.ycombinator.com/item?id=1595991

I've repeated this comment in a new submission since I think the subject deserves a discussion of its own:

http://news.ycombinator.com/item?id=1814973

Re:Programming is hard by sp4rki on Thursday October 21, 2010 @01:56PM (#1816650)
I agree that some problems are easier solved in different languages, the same way every polyglot shifts languages depending on what he is trying to convey; nevertheless I think this is actually a by product of context, not necessarily because of a necessity to use a language. I generally think of a broad idea and probably pseudocode (which can have any syntax I want or create on the fly) which then morphs into a programming language either as I express the complex idea or as I add detail to the scope of the solution.

Also, the joke does have a translation to English: "How do you call an elevator in Spanish?" "With your finger." Expressing yourself is a game of context and expressing an idea is not necessarily a verbatim translation from one language to another.

On another note, on the "to wait" and "to hope" comment, you are right depending on what mannerism the people around. I could very well say "tengo la esperanza de" is as much a Translation as "espero que". Again proof that context and semantics are more important than language choices themselves.

Re:Programming is hard by Kliment on Thursday October 21, 2010 @10:26AM (#1815485)
As a translation to the joke:

"How do you call an elevator in English?" "With your finger."

Re:Programming is hard by RiderOfGiraffes on Thursday October 21, 2010 @10:54AM (#1815645)
But until you have the punchline the correct "free" translation of the question is "What do you call an elevator in English?". It's only after you've heard the punchline that you have to go back and re-interpret the question.
Re:Programming is hard by Kliment on Thursday October 21, 2010 @11:13AM (#1815759)
Which is why context-free translation is crap. The question itself is translatable, as is the answer itself. But the composition of the two translations is not the translation of the whole. This is equivalent to the translation of a sentence by compositing the translations of each of the words without taking into account their role in the sentence. "How do you call X in L?" is a perfectly valid and understandable English sentence, although less idiomatic than "What do you call X in L?" or "How is X called in L?". The context informs the translation.
Re:Programming is hard by johnaspden on Thursday October 21, 2010 @06:07AM (#1814866)
That is a fascinating article, but isn't its point rather that languages probably do have an influence on how you think?

And no-one is claiming that you can't do closures in C, but I am claiming that C-only programmers don't usually think in those terms, because the language makes them more complicated than they need to be.

Re:Programming is hard by sp4rki on Thursday October 21, 2010 @01:59PM (#1816668)
Actually I think they have more an effect on how you express yourself. If closures are the solution to my problem I'll probably think about it in language agnostic way first, and then express it in code in whatever language I prefer or need to write in.