News for hackers. Stuff that matters.
Re:Programming is hard by sp4rki on Wednesday October 20, 2010 @04:41PM (#1812984)
"As a linguistics major, you're no stranger to the idea that a person is only capable of having thoughts and ideas that can be expressed in their language."

This is, IMO, so wrong on many levels. My native tongue is Spanish, but I'm also fluent in English, French and German; however I find myself thinking in all of them with the exception of German (I guess I'm not as fluent as I thought I was in it ;)). In the same way, I started with C when I was around 12 years old, and I've had no problem thinking in C, Java, Ruby or Python (which are the languages I use mainly). I think as long as you understand the language itself you won't have to think back to a different one to process your thoughts.

And don't get me started on the math. Math is extremely important in programming. I have a friend that shares that though that math is not important, and his code is hideous (Ok he uses ONLY Php, as it's his opinion all other languages are complicated and inflexible). Math can help you accomplish a plethora of things easily, faster, and more productively.

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.
Re:Programming is hard by Twisol on Thursday October 21, 2010 @05:15AM (#1814784)
> My native tongue is Spanish, but I'm also fluent in English, French and German; however I find myself thinking in all of them

I think the point is that you can only readily think in terms of what you know. Now, if you're fluent in English, French, German, and Spanish, it's almost a given that you'll be able to think in terms of any of the prominent concepts in those languages. I think the author was really saying that, if you learn a language with a broad range of concepts first, it can only help you as you progress, because you'll be able to actively use those concepts.

For example, I know a number of imperative languages, but I've only recently experimented with functional languages like Lisp. The conceptual shift is fascinating, and something I wouldn't have quite grasped if I constrained myself to imperative languages.

Re:Programming is hard by sp4rki on Thursday October 21, 2010 @01:40PM (#1816576)
Actually the author kind of made the distinction that he believes your first language should be so an so, so it becomes the 'base thinking platform' (so to speak) in which a programmer develops code in his mind. I agree with you though, you can mostly think (in real life and in programming) in terms of languages you're already fluent in; however being introduced to a new concept can give way to new ways of thinking that can probably be expressed in every language, albeit poorly in some.
Re:Programming is hard by Natsu on Wednesday October 20, 2010 @05:10PM (#1813116)
Agreed. It makes it sound like we cannot come up with new ideas or new words, which we all know that we can. My first language was a form of BASIC. Then I mostly programmed on my calculator in another BASIC-derived language not far removed from assembly (GOTO was the only flow control it offered). When I moved to C, suddenly the patterns of if/then and do/while/for loops immediately made sense: I had been using them the entire time without realizing it.

And math? I can't help but use it. When people ask for estimates, I always do some math based on known quantities rather than just guessing. I keep track of how far off my estimates were to apply later corrections and reason backwards to figure out which of my assumptions were wrong (leading to better estimates in the future). I've done merge sort by hand on stacks of paper (and found the speedup when you have a big gap between two merged piles and can move an entire chunk to the sorted pile).

And that's not even counting my job, where I end up doing lots of geometry. Knowing the formulas for mutually tangent circles or the formula to find the two intersection points of two circles is surprisingly useful (the case where you have zero or infinity intersection points just doesn't come up and even having one point multiplicity two is rare).

I wish I knew more math. I know more than most people and I even have a degree in it, but there's so much great stuff like linear algebra, statistics, graph theory, and game theory that I never feel like I know enough about any of them.

Re:Programming is hard by johnaspden on Thursday October 21, 2010 @06:10AM (#1814873)
Is there really no piece of Spanish that you cannot translate into English without changing the meaning? And no English poem that will not translate into Spanish without losing some of its power?
Re:Programming is hard by sdasds on Wednesday October 20, 2010 @08:49PM (#1813799)
"As a linguistics major, you're no stranger to the idea that a person is only capable of having thoughts and ideas that can be expressed in their language."

I am sorry but this is bullshit, I am glad I no longer visit this crappy forum filled with linguist turned Ruby Dev masquerading as Software Engineers and Computer Scientists.

If you have an idea and if you can make it run on a machine, then it means you can convert it into the machine code, which is what everything gets finally converted into. Also if this guy knew math it is called as Turing Principle and as long as the language is Turing complete it makes no difference.